Open Bug 1963114 Opened 23 days ago Updated 23 days ago

Update libyuv to new version 1e40e34573c3861480d107cd4a4ce290df79951f from 2025-04-29 00:00:00

Categories

(Core :: Graphics, enhancement)

enhancement

Tracking

()

Tracking Status
firefox140 --- affected

People

(Reporter: update-bot, Unassigned, NeedInfo)

Details

(Whiteboard: [3pl-filed][task_id: Fc7ROo2sS6qmbRXO2u3tBg])

This update covers 16 commits. Here are the overall diff statistics, and then the commit information.


media/libyuv/libyuv/Android.bp | 3 +
media/libyuv/libyuv/CMakeLists.txt | 10 +-
media/libyuv/libyuv/DEPS | 388 +++----
media/libyuv/libyuv/README.chromium | 2 +-
media/libyuv/libyuv/docs/getting_started.md | 2 -
media/libyuv/libyuv/include/libyuv/cpu_id.h | 1 +
media/libyuv/libyuv/include/libyuv/cpu_support.h | 14 +-
media/libyuv/libyuv/include/libyuv/planar_functions.h | 39 -
media/libyuv/libyuv/include/libyuv/row.h | 78 +-
media/libyuv/libyuv/include/libyuv/row_sve.h | 6 +-
media/libyuv/libyuv/include/libyuv/scale_row.h | 50 +-
media/libyuv/libyuv/include/libyuv/version.h | 2 +-
media/libyuv/libyuv/libyuv.gyp | 126 +--
media/libyuv/libyuv/libyuv.gypi | 36 +-
media/libyuv/libyuv/source/compare_neon64.cc | 2 +-
media/libyuv/libyuv/source/cpu_id.cc | 26 +-
media/libyuv/libyuv/source/mjpeg_decoder.cc | 5 +-
media/libyuv/libyuv/source/row_gcc.cc | 956 +++++++++---------
media/libyuv/libyuv/source/row_lasx.cc | 14 +
media/libyuv/libyuv/source/row_lsx.cc | 14 +
media/libyuv/libyuv/source/row_neon.cc | 2 +-
media/libyuv/libyuv/source/row_neon64.cc | 54 +-
media/libyuv/libyuv/source/scale_argb.cc | 6 +-
media/libyuv/libyuv/source/scale_gcc.cc | 62 +-
media/libyuv/libyuv/source/scale_rvv.cc | 1 +
media/libyuv/libyuv/unit_test/convert_test.cc | 5 -
media/libyuv/libyuv/unit_test/cpu_test.cc | 4 +
media/libyuv/libyuv/unit_test/planar_test.cc | 2 +
media/libyuv/libyuv/util/cpuid.c | 2 +
media/libyuv/moz.yaml | 2 +-
30 files changed, 897 insertions(+), 1017 deletions(-)


1e40e34573c3861480d107cd4a4ce290df79951f by WANG Xuerui <xen0n@gentoo.org>

https://chromium.googlesource.com/libyuv/libyuv//+/1e40e34573c3861480d107cd4a4ce290df79951f
Authored: 2025-02-09 17:04:50 +0800
Committed: 2025-04-15 14:03:27 -0700

Add missing files for loong64 GYP build

There are a few added source files since the (re-)addition of GYP build
support, for better SIMD optimization support (AArch64 SME & SVE,
LoongArch LSX & LASX, RISC-V RVV). This CL covers the LoongArch part in
preparation of fixing GYP builds for this architecture.

The files' arch-specific contents are all gated behind preprocessor
macro checks, so it is safe to have everything included in the build
unconditionally.

Bug: None
Change-Id: I2da37c1db79c2d8316ae42079e79efed2a2030a9
Reviewed-on: https://chromium-review.googlesource.com/c/libyuv/libyuv/+/6241803
Reviewed-by: Wan-Teh Chang <wtc@google.com>
Reviewed-by: Frank Barchard <fbarchard@chromium.org>

Files Modified:

  • libyuv.gypi

fb7b9a4df433af724a117f0caa4f61b83eb93cc6 by Mark Zhuang <mark.zhuang@spacemit.com>

https://chromium.googlesource.com/libyuv/libyuv//+/fb7b9a4df433af724a117f0caa4f61b83eb93cc6
Authored: 2025-02-14 14:17:17 +0800
Committed: 2025-04-15 14:02:28 -0700

Fix typo, remove mips as title already contain mips

Change-Id: I884f2f3ba937ec71fa070373e5c32977d35e7e75
Reviewed-on: https://chromium-review.googlesource.com/c/libyuv/libyuv/+/6267779
Reviewed-by: Frank Barchard <fbarchard@chromium.org>
Reviewed-by: Mirko Bonadei <mbonadei@chromium.org>

Files Modified:

  • docs/getting_started.md

ce488afb7b1a1d9279ddeddb3fcade534d741c81 by Wan-Teh Chang <wtc@google.com>

https://chromium.googlesource.com/libyuv/libyuv//+/ce488afb7b1a1d9279ddeddb3fcade534d741c81
Authored: 2025-04-11 15:40:18 -0700
Committed: 2025-04-13 10:08:52 -0700

Call cmake_minimum_required(VERSION 3.16) first

CMake version >= 3.16 comes from Google's Foundational C++ Support
matrix:
https://github.com/google/oss-policies-info/blob/main/foundational-cxx-support-matrix.md

Call cmake_minimum_required() first, followed by project().

These changes fix two warnings from cmake version 3.31.5 and 4.0.1.

Change-Id: I42d51f2764d95e23a45a709986011dc0aafb3cf8
Reviewed-on: https://chromium-review.googlesource.com/c/libyuv/libyuv/+/6451084
Reviewed-by: Frank Barchard <fbarchard@chromium.org>
Reviewed-by: James Zern <jzern@google.com>
Commit-Queue: Frank Barchard <fbarchard@chromium.org>

Files Modified:

  • CMakeLists.txt

bf0f29fdf9eb731394adff73635f4f37aab95fec by Mirko Bonadei <mbonadei@chromium.org>

https://chromium.googlesource.com/libyuv/libyuv//+/bf0f29fdf9eb731394adff73635f4f37aab95fec
Authored: 2025-04-10 07:54:02 +0000
Committed: 2025-04-10 04:15:34 -0700

Roll chromium_revision 908f3898af..3d4d5701ea (1403569:1445131)

Change log: https://chromium.googlesource.com/chromium/src/+log/908f3898af..3d4d5701ea
Full diff: https://chromium.googlesource.com/chromium/src/+/908f3898af..3d4d5701ea

Changed dependencies

Clang version changed llvmorg-20-init-16062-g091448e3:llvmorg-21-init-6681-g5b36835d
Details: https://chromium.googlesource.com/chromium/src/+/908f3898af..3d4d5701ea/tools/clang/scripts/update.py

BUG=None

Change-Id: I165d415f9dd1e0d318bdc7eb4ab9fb34d1e81050
Reviewed-on: https://chromium-review.googlesource.com/c/libyuv/libyuv/+/6441069
Reviewed-by: Jeremy Leconte <jleconte@google.com>
Commit-Queue: Mirko Bonadei <mbonadei@chromium.org>

Files Modified:

  • .gn
  • DEPS

8c48036d15d66ae951edbbeccfd3d0f268d589b9 by Wan-Teh Chang <wtc@google.com>

https://chromium.googlesource.com/libyuv/libyuv//+/8c48036d15d66ae951edbbeccfd3d0f268d589b9
Authored: 2025-04-04 12:45:35 -0700
Committed: 2025-04-04 15:48:23 -0700

Remove duplicate code in planar_functions.h

The declarations of ARGBAffineRow_C and ARGBAffineRow_SSE2 and the code
to support those declarations are duplicated in planar_functions.h. They
are already in row.h, so we can simply remove them.

Change-Id: I9b522fdd201ca530f1268bf4200cd2e18b806ba5
Reviewed-on: https://chromium-review.googlesource.com/c/libyuv/libyuv/+/6434733
Reviewed-by: Frank Barchard <fbarchard@chromium.org>
Commit-Queue: Wan-Teh Chang <wtc@google.com>

Files Modified:

  • include/libyuv/planar_functions.h
  • unit_test/planar_test.cc

6cc603a8cfe991bac768410499a01afc3267e740 by Wan-Teh Chang <wtc@google.com>

https://chromium.googlesource.com/libyuv/libyuv//+/6cc603a8cfe991bac768410499a01afc3267e740
Authored: 2025-04-04 12:43:14 -0700
Committed: 2025-04-04 15:43:59 -0700

convert_test.cc: Remove unused ENABLE_ROW_TESTS

The ENABLE_ROW_TESTS macro is not used in convert_test.cc.

Change-Id: Icc50ec465beca81e14a9683a717680e179a541dd
Reviewed-on: https://chromium-review.googlesource.com/c/libyuv/libyuv/+/6434620
Reviewed-by: Frank Barchard <fbarchard@chromium.org>
Commit-Queue: Wan-Teh Chang <wtc@google.com>

Files Modified:

  • unit_test/convert_test.cc

b7a857659f8485ee3c6769c27a3e74b0af910746 by Wan-Teh Chang <wtc@google.com>

https://chromium.googlesource.com/libyuv/libyuv//+/b7a857659f8485ee3c6769c27a3e74b0af910746
Authored: 2025-04-03 11:03:44 -0700
Committed: 2025-04-03 11:27:31 -0700

Disable Arm SME and SVE assmbly code under MSan

The code that disables Arm and Intel assembly code under MSan is
duplicated in cpu_support.h and planar_functions.h. This CL does not
address the code duplication.

Bug: b:407277484, b:407278016, b:407278132
Change-Id: If70fd8d3382916041d75efabcc84010ea3f1e60e
Reviewed-on: https://chromium-review.googlesource.com/c/libyuv/libyuv/+/6430806
Commit-Queue: Frank Barchard <fbarchard@chromium.org>
Reviewed-by: Frank Barchard <fbarchard@chromium.org>

Files Modified:

  • include/libyuv/cpu_support.h
  • include/libyuv/planar_functions.h

a4f653b38993a0f3aee9821b893266afd96c8977 by Wan-Teh Chang <wtc@google.com>

https://chromium.googlesource.com/libyuv/libyuv//+/a4f653b38993a0f3aee9821b893266afd96c8977
Authored: 2025-04-02 16:12:19 -0700
Committed: 2025-04-02 16:46:28 -0700

Fix CMakeLists.txt for compatibility with gcc 10

Based on the libavif pull request
https://github.com/AOMediaCodec/libavif/pull/2660
by Frankie Dintino <fdintino@gmail.com>.

Bug: 399856238
Change-Id: I9b21a0cf1fd26b71d86090f41841eefa4d6bb194
Reviewed-on: https://chromium-review.googlesource.com/c/libyuv/libyuv/+/6405834
Reviewed-by: George Steed <george.steed@arm.com>
Reviewed-by: Frank Barchard <fbarchard@chromium.org>
Commit-Queue: Wan-Teh Chang <wtc@google.com>

Files Modified:

  • CMakeLists.txt

55a708e2265b0badf029f1f0388335504cd90cbb by WANG Xuerui <xen0n@gentoo.org>

https://chromium.googlesource.com/libyuv/libyuv//+/55a708e2265b0badf029f1f0388335504cd90cbb
Authored: 2025-02-15 10:02:45 +0800
Committed: 2025-04-01 09:48:19 -0700

Fix unified sources build for LoongArch LASX

Several consumers of libyuv do unified sources build where many source
files are #include'd together to make compilation units larger and allow
for more optimization chances. But for LoongArch there is a wrinkle:
LASX and LSX code paths are implemented in separate files, unlike the
other currently supported architectures, and some definitions are
duplicated e.g. struct RgbConstants.

Since the duplicated content is identical across the two files, short of
some bigger refactoring, we can simply place #ifdef guards around the
definitions to fix unified sources build for LoongArch.

Change-Id: I952e8e0210221ec8bcc113f75fa1b9ba515ec323
Reviewed-on: https://chromium-review.googlesource.com/c/libyuv/libyuv/+/6272801
Reviewed-by: Mirko Bonadei <mbonadei@chromium.org>
Reviewed-by: Frank Barchard <fbarchard@chromium.org>
Commit-Queue: Mirko Bonadei <mbonadei@chromium.org>

Files Modified:

  • source/row_lasx.cc
  • source/row_lsx.cc

23d416d6f32539bc7e44afa2bec6ce0128dbed0b by Frank Barchard <fbarchard@google.com>

https://chromium.googlesource.com/libyuv/libyuv//+/23d416d6f32539bc7e44afa2bec6ce0128dbed0b
Authored: 2025-03-31 16:37:34 -0700
Committed: 2025-03-31 17:27:40 -0700

Detect SME without SVE dependency

Bug: None
Change-Id: Ibe29488e893a493699ea3fae1a1a54a4fff5969c
Reviewed-on: https://chromium-review.googlesource.com/c/libyuv/libyuv/+/6418571
Reviewed-by: Wan-Teh Chang <wtc@google.com>

Files Modified:

  • README.chromium
  • include/libyuv/version.h
  • source/cpu_id.cc

dc47c71b3ec6900ca336e712b2217ffe0c9e5a27 by Wan-Teh Chang <wtc@google.com>

https://chromium.googlesource.com/libyuv/libyuv//+/dc47c71b3ec6900ca336e712b2217ffe0c9e5a27
Authored: 2025-03-31 13:06:48 -0700
Committed: 2025-03-31 13:14:45 -0700

Bump cmake_minimum_required version to 3.5

We started to get the following error in libavif's GitHub CI workflows:

CMake Error at CMakeLists.txt:8 (cmake_minimum_required):
Compatibility with CMake < 3.5 has been removed from CMake.

Change-Id: If2490208cc3e7da22ff67557c5cdd4bd9f2499ad
Reviewed-on: https://chromium-review.googlesource.com/c/libyuv/libyuv/+/6416369
Commit-Queue: Wan-Teh Chang <wtc@google.com>
Reviewed-by: Frank Barchard <fbarchard@chromium.org>

Files Modified:

  • CMakeLists.txt

a43f62aa406b126ed38e3ec2ffc0de787db7cb26 by Hang Nguyen <hnt@google.com>

https://chromium.googlesource.com/libyuv/libyuv//+/a43f62aa406b126ed38e3ec2ffc0de787db7cb26
Authored: 2025-03-31 17:10:00 +0000
Committed: 2025-03-31 10:47:47 -0700

Enable CFI assembly support

Adds the sanitizer for the static library libyuv to enable CFI assembly
support

Bug: 400789169
Change-Id: I9be82d90d60535fdf59e4e729778a455e946e4cc
Reviewed-on: https://chromium-review.googlesource.com/c/libyuv/libyuv/+/6414818
Reviewed-by: James Zern <jzern@google.com>
Reviewed-by: Frank Barchard <fbarchard@chromium.org>

Files Modified:

  • Android.bp

f145aa26da5c660d1e6376e2794eba444ae2eda5 by Frank Barchard <fbarchard@google.com>

https://chromium.googlesource.com/libyuv/libyuv//+/f145aa26da5c660d1e6376e2794eba444ae2eda5
Authored: 2025-03-27 04:05:15 -0700
Committed: 2025-03-27 11:08:08 -0700

Add SME2 detect

Bug: None
Change-Id: I36e576de1cf468049faaf3923b6c21fc9ad14271
Reviewed-on: https://chromium-review.googlesource.com/c/libyuv/libyuv/+/6401373
Reviewed-by: George Steed <george.steed@arm.com>

Files Modified:

  • include/libyuv/cpu_id.h
  • source/cpu_id.cc
  • unit_test/cpu_test.cc
  • util/cpuid.c

64ac2d8f0fb893a22716afc35bd0501567b1ed31 by George Steed <george.steed@arm.com>

https://chromium.googlesource.com/libyuv/libyuv//+/64ac2d8f0fb893a22716afc35bd0501567b1ed31
Authored: 2025-03-24 13:21:42 +0000
Committed: 2025-03-26 04:08:46 -0700

Avoid odd width stores in I422ToRGB565Row_{SVE2,SME}

The existing code for creating RGB565 data in SVE2 and SME produces two
vectors of interleaved 16-bit elements due to the nature of how SVE
widening instructions operate. This means that the indices of the 16-bit
data created appear in the two result vectors as such:

z18.b: [elem0 byte0, elem0 byte1, elem2 byte0, elem2 byte1, ...]
z19.b: [elem1 byte0, elem1 byte1, elem3 byte0, elem3 byte1, ...]

This is problematic for the final (predicated) iteration of the
conversion since the p1 predicate input to the ST2H instruction controls
storing the four bytes corresponding to the first two elements, in the
first two bytes of z18 and z19. This means that in the case that the
width is an odd number there is no way of storing just elem0 in z18
individually.

This patch addresses this by permuting the z18/z19 data such that the
two bytes from each element are split evenly across the two vectors:

z20.b: [elem0 byte0, elem1 byte0, elem2 byte0, elem3 byte0, ...]
z21.b: [elem0 byte1, elem1 byte1, elem2 byte1, elem3 byte1, ...]

Since we would now always store the same lanes from both vectors we can
continue to use the same predicate without further changes.

The existing (non-tail) loop body utilizes an all-true predicate so we
can avoid the extra permutes in this case, avoiding any performance
degradation.

Change-Id: I7d2be27c84cd9eb02cebac54a14c3498911f21d3
Reviewed-on: https://chromium-review.googlesource.com/c/libyuv/libyuv/+/6395137
Reviewed-by: Frank Barchard <fbarchard@chromium.org>
Commit-Queue: Frank Barchard <fbarchard@chromium.org>

Files Modified:

  • include/libyuv/row_sve.h

5f284054cb806f82e737f738003d764277970d45 by Frank Barchard <fbarchard@google.com>

https://chromium.googlesource.com/libyuv/libyuv//+/5f284054cb806f82e737f738003d764277970d45
Authored: 2025-03-25 11:54:02 -0700
Committed: 2025-03-25 12:51:25 -0700

RVV disable 64 bit elements and vcombine_v

Bug: 405451074
Change-Id: I8e4437be92934b3c367c94d867d7967c32747260
Reviewed-on: https://chromium-review.googlesource.com/c/libyuv/libyuv/+/6385788
Reviewed-by: Wan-Teh Chang <wtc@google.com>

Files Modified:

  • README.chromium
  • include/libyuv/row.h
  • include/libyuv/scale_row.h
  • include/libyuv/version.h
  • source/scale_argb.cc
  • source/scale_rvv.cc

0c070321828d9360c3ad62e6ee5bd747d9fc0133 by Frank Barchard <fbarchard@google.com>

https://chromium.googlesource.com/libyuv/libyuv//+/0c070321828d9360c3ad62e6ee5bd747d9fc0133
Authored: 2025-03-25 11:43:17 -0700
Committed: 2025-03-25 11:49:25 -0700

clang format applies to git repo

Bug: None
Change-Id: Ida65a0033e8c783230cadf6912416ffd9bbf90e1
Reviewed-on: https://chromium-review.googlesource.com/c/libyuv/libyuv/+/6393515
Reviewed-by: Wan-Teh Chang <wtc@google.com>

Files Modified:

  • source/compare_neon64.cc
  • source/row_gcc.cc
  • source/row_neon.cc
  • source/row_neon64.cc
  • source/scale_gcc.cc

Updatebot encountered an error while trying to apply the mozilla patches. with the following message:

stdout:
Importing local patches...
patch -p1 -r /dev/stdout --directory media/libyuv/libyuv/ --input /builds/worker/checkouts/gecko/media/libyuv/00_fix_build_errors.patch --no-backup-if-mismatch
patching file include/libyuv/row.h
patch unexpectedly ends in middle of line
Hunk #2 succeeded at 125 with fuzz 1.
patch -p1 -r /dev/stdout --directory media/libyuv/libyuv/ --input /builds/worker/checkouts/gecko/media/libyuv/01_make_mjpeg_printfs_optional.patch --no-backup-if-mismatch
patching file source/mjpeg_decoder.cc
Hunk #2 succeeded at 459 (offset 7 lines).
patch -p1 -r /dev/stdout --directory media/libyuv/libyuv/ --input /builds/worker/checkouts/gecko/media/libyuv/02_update_gyp.patch --no-backup-if-mismatch
patching file libyuv.gyp
patch -p1 -r /dev/stdout --directory media/libyuv/libyuv/ --input /builds/worker/checkouts/gecko/media/libyuv/03_add_neon64_and_sve_gyp_targets.patch --no-backup-if-mismatch
patching file libyuv.gyp
patching file libyuv.gypi
Hunk #2 succeeded at 64 (offset 1 line).
Hunk #3 FAILED at 81.
Hunk #4 succeeded at 102 with fuzz 2 (offset 5 lines).
1 out of 4 hunks FAILED -- saving rejects to file /dev/stdout
patch: **** Can't create file /dev/stdout : Too many levels of symbolic links
Could not apply media/libyuv/03_add_neon64_and_sve_gyp_targets.patch, possible reasons:

  • You ran --patch-mode=only before running --patch-mode=none

  • You tried to apply the patches twice

  • The library update has modified the files so the patch no longer applies cleanly
    I am going to re-throw the exception now.
    Error running mach:

    mach vendor --patch-mode only media/libyuv/moz.yaml

The error occurred in code that was called by the mach command. This is either
a bug in the called code itself or in the way that mach is calling it.
You can invoke ./mach busted to check if this issue is already on file. If it
isn't, please use ./mach busted file vendor to report it. If ./mach busted is
misbehaving, you can also inspect the dependencies of bug 1543241.

If filing a bug, please include the full output of mach, including this error
message.

The details of the failure are as follows:

Exception: Process executed with non-0 exit code 2: patch -p1 -r /dev/stdout --directory media/libyuv/libyuv/ --input /builds/worker/checkouts/gecko/media/libyuv/03_add_neon64_and_sve_gyp_targets.patch --no-backup-if-mismatch

File "/builds/worker/checkouts/gecko/python/mozbuild/mozbuild/vendor/mach_commands.py", line 147, in vendor
vendor_command.vendor(
File "/builds/worker/checkouts/gecko/python/mozbuild/mozbuild/vendor/vendor_manifest.py", line 134, in vendor
self.import_local_patches(
File "/builds/worker/checkouts/gecko/python/mozbuild/mozbuild/vendor/vendor_manifest.py", line 918, in import_local_patches
raise e
File "/builds/worker/checkouts/gecko/python/mozbuild/mozbuild/vendor/vendor_manifest.py", line 904, in import_local_patches
self.run_process(
File "/builds/worker/checkouts/gecko/python/mach/mach/mixin/process.py", line 194, in run_process
raise Exception(

Updatebot will be unable to do anything more for this library version.

Flags: needinfo?(ngrunbaum)
You need to log in before you can comment on or make changes to this bug.