- Add +i8mm build option for sve ARGBToUV which uses usdot
- util/cpuid Get cpu count (windows, macos, linux)
- For each x86 cpu, detect hybrid (e-core)
- Includes a comment fix for ubsan unittest
- Bump version
- Apply clang format to util/*.c as well as all *.cc/*.h
Bug: 424637372
Change-Id: I08310e18051fff62c9e4e4a10d1e4361871119ac
Reviewed-on: https://chromium-review.googlesource.com/c/libyuv/libyuv/+/6635640
Reviewed-by: Wan-Teh Chang <wtc@google.com>
This is an attempt to make linux_msan bot less flaky which is suggested by the error message:
FATAL: Make sure to compile with -fPIE and to link with -pie.
Bug: None
Change-Id: I43f4e5c10d9a4c42a8ef5a67bf77806f0c09bf98
Reviewed-on: https://chromium-review.googlesource.com/c/libyuv/libyuv/+/6111093
Reviewed-by: Mirko Bonadei <mbonadei@chromium.org>
Commit-Queue: Jeremy Leconte <jleconte@google.com>
Including associated changes for adding a new scale_sme.cc file.
There is no benefit from an SVE version of this kernel for devices with
an SVE vector length of 128-bits, so skip directly to SME instead. We
do not use the ZA tile here, so this is a purely streaming-SVE (SSVE)
implementation.
Change-Id: I47d149613fbabd8c203605a809811f1a668e8fb7
Reviewed-on: https://chromium-review.googlesource.com/c/libyuv/libyuv/+/5913883
Reviewed-by: Frank Barchard <fbarchard@chromium.org>
Reviewed-by: Justin Green <greenjustin@google.com>
Including addition of a new row_sme.cc file and associated
infrastructure.
The actual implementation in this case is a pure streaming-SVE (SSVE)
implementation based on the existing SVE2 implementation, we do not use
the ZA tile.
Change-Id: Ibc132c55de8d41a107e563b95f842323fef94444
Reviewed-on: https://chromium-review.googlesource.com/c/libyuv/libyuv/+/5913881
Reviewed-by: Justin Green <greenjustin@google.com>
Reviewed-by: Frank Barchard <fbarchard@chromium.org>
Extend both the CMake and BUILD.gn configurations to support building a
library with the Arm Scalable Matrix Extension (SME). Add an initial
(empty) rotate_sme.cc source file to populate the library for now.
Change-Id: Icd4bd6a8ce72ba132299b00c99478a18a85d869a
Reviewed-on: https://chromium-review.googlesource.com/c/libyuv/libyuv/+/5588664
Reviewed-by: Justin Green <greenjustin@google.com>
Reviewed-by: Frank Barchard <fbarchard@chromium.org>
This commit only adds the bare minimum to get the new library building
through GN, the actual content of row_sve.cc is empty for now until we
start porting some kernels across.
Bug: libyuv:973
Change-Id: Ibdf4fc258761f3e507d700f27a405099c667ac75
Reviewed-on: https://chromium-review.googlesource.com/c/libyuv/libyuv/+/5424738
Reviewed-by: Frank Barchard <fbarchard@chromium.org>
This should allow us to use the two extensions in the existing Neon
inline assembly code for kernels like ARGBToY.
Bug: libyuv:977
Change-Id: I5274b188771bcfbe927cb323f499ecb676a7c6ba
Reviewed-on: https://chromium-review.googlesource.com/c/libyuv/libyuv/+/5383442
Reviewed-by: Frank Barchard <fbarchard@chromium.org>
While porting libyuv's GN to other build systems, I discovered that
several headers were absent in the GN and GYP build files. These headers
are utilized in the source files but were not included in the GN and GYP
build configurations.
Without these headers, the Bazel build fails with the following error:
ERROR: /path/to/bazel/external/libyuv/BUILD.bazel:4:11: Compiling source/compare.cc failed: (Exit 1): clang-17 failed: error executing CppCompile command (from target @@libyuv//:libyuv) /usr/bin/clang-17 -U_FORTIFY_SOURCE -fstack-protector -Wall -Wthread-safety -Wself-assign -Wunused-but-set-parameter -Wno-free-nonheap-object -fcolor-diagnostics -fno-omit-frame-pointer '-std=c++14' ... (remaining 32 arguments skipped)
Use --sandbox_debug to see verbose messages from the sandbox and retain the sandbox build root for debugging
external/libyuv/source/compare.cc:20:10: fatal error: 'libyuv/compare_row.h' file not found
20 | #include "libyuv/compare_row.h"
| ^~~~~~~~~~~~~~~~~~~~~~
1 error generated.
Bug: None
Change-Id: I39c4c545e381d5f28c749f9ba8940e039aa55dfc
Reviewed-on: https://chromium-review.googlesource.com/c/libyuv/libyuv/+/5380588
Reviewed-by: Mirko Bonadei <mbonadei@chromium.org>
Commit-Queue: Mirko Bonadei <mbonadei@chromium.org>
Update build files to include the new tests and source code.
Bug: libyuv:956
Change-Id: I6ec0beb6dc9570f0597d7df1835d616489dbaece
Reviewed-on: https://chromium-review.googlesource.com/c/libyuv/libyuv/+/5103585
Reviewed-by: Mirko Bonadei <mbonadei@chromium.org>
Commit-Queue: Frank Barchard <fbarchard@chromium.org>
Currently, chromium has merged loongarch config file in bug:1454442,
and so we resubmit gn builds support for loongarch.
Bug: chromium:1289502
Change-Id: Iac83f5ea016945f7d9cc5f6de20d4c561bab6347
Reviewed-on: https://chromium-review.googlesource.com/c/libyuv/libyuv/+/4615589
Reviewed-by: Frank Barchard <fbarchard@chromium.org>
Commit-Queue: Frank Barchard <fbarchard@chromium.org>
Include row_rvv.cc source file and support for riscv64 builds in Android
and GN builds. Adds GN build flag to disable RISC-V vector operations.
Switches dynamic linker to 64-bit by default, with exceptions for 32-bit
targets as defined in //build/config/android/abi.gni.
Bug: b/280364043
Test: Verified local build via Android and GN.
Change-Id: I1bbd36f16aafa16d4bfd117de03354be79743a9d
Reviewed-on: https://chromium-review.googlesource.com/c/libyuv/libyuv/+/4501727
Reviewed-by: Mirko Bonadei <mbonadei@chromium.org>
Commit-Queue: Prashanth Swaminathan <prashanthsw@google.com>
Reviewed-by: Frank Barchard <fbarchard@chromium.org>
MJPGToI420 and MJPGToNV12 are needed for successfully compiling
/m/c/v/m/sample_buffer_transformer_mac.cc on ios-blink port.
This CL enables JPEG support for ios-blink port of chromium.
Bug: 1411704
Change-Id: I2009b371a35fa881b9e95ad4fad22356992cef52
Reviewed-on: https://chromium-review.googlesource.com/c/libyuv/libyuv/+/4454847
Reviewed-by: Frank Barchard <fbarchard@chromium.org>
Commit-Queue: Frank Barchard <fbarchard@chromium.org>
- Add I210ToI420 to convert 10 bit 4:2:2 YUV to 4:2:0 8 bit
- Add NEON InterpolateRow_16 for fast 10 bit scaling
- When scaling up, set step to interpolate toward height - 1 to avoid buffer overread
- When scaling down, center the 2 rows used for source to achieve filtering.
- CopyPlane check for 0 size and return
Bug: libyuv:931, b/228605787, b/233233302, b/233634772, b/234558395, b/234340482
Change-Id: I63e8580710a57812b683c2fe40583ac5a179c4f1
Reviewed-on: https://chromium-review.googlesource.com/c/libyuv/libyuv/+/3687552
Reviewed-by: Mirko Bonadei <mbonadei@chromium.org>
Reviewed-by: richard winterton <rrwinterton@gmail.com>
This function reads 2 byte values and writes the 2nd byte to the destination.
It turns out this is useful for P010ToNV12 as well, so adding the planar function allows a high level to call this.
And adds UYVY support for something YUY2 already had. Which is writing the 1st byte.
Bug: b/233233302, b/233634772
Change-Id: I10a9454cb4f5b2c4ac5532fa86feddf78284d8b8
Reviewed-on: https://chromium-review.googlesource.com/c/libyuv/libyuv/+/3659055
Commit-Queue: Frank Barchard <fbarchard@chromium.org>
Reviewed-by: richard winterton <rrwinterton@gmail.com>
Reviewed-by: Frank Barchard <fbarchard@chromium.org>
When building for ARM target with "libyuv_use_neon" set to false, the
build fails because there are still codes that reference to the NEON
related functions. To disable these code parts completely, the
LIBYUV_DISABLE_NEON macro should be defined when the "libyuv_use_neon"
is set to false.
Bug: libyuv:929
Change-Id: I8f34288d0d17dd29b85db004e62d83e4ace3d595
Reviewed-on: https://chromium-review.googlesource.com/c/libyuv/libyuv/+/3628112
Reviewed-by: Mirko Bonadei <mbonadei@chromium.org>
Commit-Queue: Mirko Bonadei <mbonadei@chromium.org>
Rename yuvconstants to .c and use round from math.h
Bug: libyuv:882, b/180472591
Change-Id: I70720bf3e0833ba00df0d721f12020fba0b07a03
Reviewed-on: https://chromium-review.googlesource.com/c/libyuv/libyuv/+/2706966
Reviewed-by: Mirko Bonadei <mbonadei@chromium.org>
Currently is_linux is true on building Chrome OS,
but it is planned to set to false. This is the preparation.
Bug: chromium:1110266
Test: Build locally.
Change-Id: Icf3445a8a828e1e1a637360363845bcca5863aca
Reviewed-on: https://chromium-review.googlesource.com/c/libyuv/libyuv/+/2400818
Reviewed-by: Frank Barchard <fbarchard@chromium.org>
The goal of this CL is to trigger all the CI bots to ensure they have
all been migrated to goma RBE.
TBR=fbarchard@chromium.org
Bug: None
Change-Id: I201ac1852bac0d7f6a53f66a0ff56bc93096c005
Reviewed-on: https://chromium-review.googlesource.com/c/libyuv/libyuv/+/2274415
Reviewed-by: Mirko Bonadei <mbonadei@chromium.org>
Commit-Queue: Mirko Bonadei <mbonadei@chromium.org>
If 'mips_arch_variant=loongson3' is setted without 'mips_use_mmi=true',
undefined reference of MMI functions will be reported.
Change-Id: I2e91d63e1fa2d6c0db907aaab978227c87c991ac
Reviewed-on: https://chromium-review.googlesource.com/c/libyuv/libyuv/+/2129285
Reviewed-by: Frank Barchard <fbarchard@chromium.org>
Commit-Queue: Frank Barchard <fbarchard@chromium.org>
This reverts the changes to BUILD.gn done by [1] because they were
breaking UBSan. At least one between:
//build/config/compiler:default_optimization
//build/config/compiler:optimize_max
need to be selected, this CL re-enables optimize_max since that was the
previous default.
[1] - https://chromium-review.googlesource.com/c/libyuv/libyuv/+/1790959
Bug: None
Change-Id: I136179c2e814f7aba9cc8515cc4825cbd41f8abb
Reviewed-on: https://chromium-review.googlesource.com/c/libyuv/libyuv/+/1809137
Commit-Queue: Frank Barchard <fbarchard@chromium.org>
Reviewed-by: Frank Barchard <fbarchard@chromium.org>
Currently, libyuv supports MIPS SIMD Arch(MSA),
but libyuv does not supports MultiMedia Instruction(MMI)(such as loongson3a platform).
In order to improve performance of libyuv on loongson3a platform,
this provides optimize 98 functions with mmi.
BUG=libyuv:804
Change-Id: I8947626009efad769b3103a867363ece25d79629
Reviewed-on: https://chromium-review.googlesource.com/1122064
Commit-Queue: Frank Barchard <fbarchard@chromium.org>
Reviewed-by: Frank Barchard <fbarchard@chromium.org>
After [1], a manual dependency on exe_and_shlib_deps is no longer necessary
since it's automatically added. This CL removes all remaining manual references
to exe_and_shlib_deps.
[1] d7ed1f0a9c
BUG=chromium:845700
R=fbarchard
Change-Id: I01ade690f3f098599ec271a1e82ec34c573e21d7
Reviewed-on: https://chromium-review.googlesource.com/1102100
Reviewed-by: Frank Barchard <fbarchard@chromium.org>
This reverts commit 724dbeba6c2397d99ee30542d80db1ea16d209ee.
Reason for revert: bots remain red after revert.
Original change's description:
> Revert "Fixing libyuv gn check."
>
> This reverts commit b625f7b932fb93b877e603a1addcf613a5a0c3eb.
>
> Reason for revert: ios builds broke shortly after this CL, so trying a revert to get builds back to green.
>
> Original change's description:
> > Fixing libyuv gn check.
> >
> > Starting from [1], GN is able to ensure that the inclusion or headers
> > with relative paths is matched by a GN dependency.
> >
> > This CL fixes the libyuv build graph according to GN.
> >
> > [1] - https://chromium-review.googlesource.com/c/chromium/src/+/827014
> >
> > Bug: webrtc:8850
> > Change-Id: I7e0f9a8bd1ae2d205213dc75bf322be587efd1f5
> > Reviewed-on: https://chromium-review.googlesource.com/903843
> > Reviewed-by: Frank Barchard <fbarchard@chromium.org>
> > Commit-Queue: Frank Barchard <fbarchard@chromium.org>
>
> TBR=fbarchard@chromium.org,mbonadei@chromium.org
>
> # Not skipping CQ checks because original CL landed > 1 day ago.
>
> Bug: webrtc:8850
> Change-Id: I8585de252bd83e2c628a37b0a0d5324ed961209e
> Reviewed-on: https://chromium-review.googlesource.com/912178
> Reviewed-by: Frank Barchard <fbarchard@chromium.org>
> Commit-Queue: Frank Barchard <fbarchard@chromium.org>
TBR=fbarchard@chromium.org,mbonadei@chromium.org
# Not skipping CQ checks because original CL landed > 1 day ago.
Bug: webrtc:8850
Change-Id: Idfd37e0e20d278b374c57d7e2c5465971aae3a52
Reviewed-on: https://chromium-review.googlesource.com/914529
Reviewed-by: Frank Barchard <fbarchard@chromium.org>
This reverts commit b625f7b932fb93b877e603a1addcf613a5a0c3eb.
Reason for revert: ios builds broke shortly after this CL, so trying a revert to get builds back to green.
Original change's description:
> Fixing libyuv gn check.
>
> Starting from [1], GN is able to ensure that the inclusion or headers
> with relative paths is matched by a GN dependency.
>
> This CL fixes the libyuv build graph according to GN.
>
> [1] - https://chromium-review.googlesource.com/c/chromium/src/+/827014
>
> Bug: webrtc:8850
> Change-Id: I7e0f9a8bd1ae2d205213dc75bf322be587efd1f5
> Reviewed-on: https://chromium-review.googlesource.com/903843
> Reviewed-by: Frank Barchard <fbarchard@chromium.org>
> Commit-Queue: Frank Barchard <fbarchard@chromium.org>
TBR=fbarchard@chromium.org,mbonadei@chromium.org
# Not skipping CQ checks because original CL landed > 1 day ago.
Bug: webrtc:8850
Change-Id: I8585de252bd83e2c628a37b0a0d5324ed961209e
Reviewed-on: https://chromium-review.googlesource.com/912178
Reviewed-by: Frank Barchard <fbarchard@chromium.org>
Commit-Queue: Frank Barchard <fbarchard@chromium.org>
Starting from [1], GN is able to ensure that the inclusion or headers
with relative paths is matched by a GN dependency.
This CL fixes the libyuv build graph according to GN.
[1] - https://chromium-review.googlesource.com/c/chromium/src/+/827014
Bug: webrtc:8850
Change-Id: I7e0f9a8bd1ae2d205213dc75bf322be587efd1f5
Reviewed-on: https://chromium-review.googlesource.com/903843
Reviewed-by: Frank Barchard <fbarchard@chromium.org>
Commit-Queue: Frank Barchard <fbarchard@chromium.org>
When developing WebRTC applications with custom video sources, libyuv's
API is often the required part of the project. For that, application
developers can link with a separate standalone instance of libyuv.
However, it is even better to avoid that binary code duplication and
link against libyuv as a part compiled into the WebRTC library.
When building WebRTC as a static library target, the symbols from libyuv
are normally accessible to the linker without any extra actions. When
building WebRTC as a shared library, that does not work as the exported
symbols are those marked as visible, while libyuv is built with the
hidden visibility setting by default.
This patch adds an extra flag to enable switching the symbol visibility
to default when building shared library targets depending on libyuv in
WebRTC and Chromium projects. By default the flag is not enabled,
preserving the prior behaviour.
Bug: NONE
Change-Id: I48893cb9f54b1e1b49a34e14434e67f91d3e5e79
Reviewed-on: https://chromium-review.googlesource.com/827746
Reviewed-by: Frank Barchard <fbarchard@chromium.org>
Commit-Queue: Frank Barchard <fbarchard@chromium.org>
Bug: libyuv:765
Test: build for mips still passes
Change-Id: I99105ad3951d2210c0793e3b9241c178442fdc37
Reviewed-on: https://chromium-review.googlesource.com/826404
Reviewed-by: Weiyong Yao <braveyao@chromium.org>
Commit-Queue: Frank Barchard <fbarchard@chromium.org>
Using public_configs, client projects must rely on public_deps to
propagate configurations up in the build graph. This is bad because
public_deps allows the exposition of headers that live in another
target. This can lead to a really unhealthy build.
On the other side, all_dependent_configs is automatically propagated
up in the build graph but if a target includes a libyuv header it is
forced by GN to declare the dependency (and this will propagate
libyuv_config).
Bug: webrtc:8605, webrtc:8603
Change-Id: I4d71bb5de0b5b62a4ec110349223614f0b98e655
No-Try: True
Reviewed-on: https://chromium-review.googlesource.com/822112
Commit-Queue: Mirko Bonadei <mbonadei@chromium.org>
Reviewed-by: Patrik Höglund <phoglund@chromium.org>