This CL aims to support custom compiler flags.
Because upstream clang has supported to build for x280 with -mcpu=sifive-x280.
Change-Id: Ic8fbf026fe6805ac5c3422a9ccc3f53293c89570
Signed-off-by: Bruce Lai <bruce.lai@sifive.com>
Reviewed-on: https://chromium-review.googlesource.com/c/libyuv/libyuv/+/4713191
Reviewed-by: Frank Barchard <fbarchard@chromium.org>
Commit-Queue: Frank Barchard <fbarchard@chromium.org>
Now that chromium/base has rolled and switched the android_ndk_root to
the new android_toolchain directory, remove the stale Android NDK. Fix
up documentation that refers to stale paths and suggest the appropriate
tools to perform objdump operations.
Bug: 1448383
Test: Verified build of LibYUV.
Change-Id: I7b674052b1ef0914cf4ee81c6c6d62410e5fc569
Reviewed-on: https://chromium-review.googlesource.com/c/libyuv/libyuv/+/4583622
Reviewed-by: Mirko Bonadei <mbonadei@chromium.org>
Commit-Queue: Prashanth Swaminathan <prashanthsw@google.com>
1. Fix compile error when build riscv without using vector
2. Fix run_qemu.sh misused v=true for USE_RVV=OFF case
3. [cmake] Fix warning by rename TEST to UNIT_TEST
Warning log:
CMake Warning (dev) at CMakeLists.txt:57 (if): [54/1931]
Policy CMP0064 is not set: Support new TEST if() operator. Run "cmake
--help-policy CMP0064" for policy details. Use the cmake_policy command to
set the policy and suppress this warning.
TEST will be interpreted as an operator when the policy is set to NEW.
Since the policy is not set the OLD behavior will be used.
This warning is for project developers. Use -Wno-dev to suppress it.
4. [cmake] Simplify logic for cross-build
Bug: libyuv:956
Change-Id: I120402fc7d6d86403e7d974180b81f4f9c663e36
Signed-off-by: Bruce Lai <bruce.lai@sifive.com>
Reviewed-on: https://chromium-review.googlesource.com/c/libyuv/libyuv/+/4486239
Reviewed-by: Frank Barchard <fbarchard@chromium.org>
Reviewed-by: Mirko Bonadei <mbonadei@chromium.org>
Commit-Queue: Frank Barchard <fbarchard@chromium.org>
1. Provide script to build qemu & clang locally
2. Enable risc-v cmake build with clang
3. Enable test with qemu
4. Update doc to introduce how to cross-build & test with qemu
Signed-off-by: Bruce Lai <bruce.lai@sifive.com>
Change-Id: I7ce8315993b0e8300e8fd5b1632610a91a4e9f52
Reviewed-on: https://chromium-review.googlesource.com/c/libyuv/libyuv/+/4401740
Reviewed-by: Frank Barchard <fbarchard@chromium.org>
Commit-Queue: 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>
iOS simulator has the option to build with xcode instead of clang.
GN use_xcode_clang=true enables the xcode build.
As of version Xcode 9.2, the clang version used does not support
AVX512. The version reported is version 9, but for normal clang,
version 7 is sufficient to AVX512.
When a version of XCode does support AVX512, the version check can
be updated to allow AVX512 for newer versions of XCode.
with XCode 9.2 the following macro is set.
__APPLE_CC__ 6000
Bug: libyuv:789
Test: gn gen out/Release "--args=is_debug=false target_os=\"ios\" ios_enable_code_signing=false target_cpu=\"x86\" use_xcode_clang=true"
Change-Id: I5a9a0b4a2760c7d09a4bcb464b3668979113b07e
Reviewed-on: https://chromium-review.googlesource.com/991595
Reviewed-by: richard winterton <rrwinterton@gmail.com>
Scalar multiply expects a 'd' register. The "w" (float) uses 's' for float
and wont work with the multiply in 32 bit (it does in 64 bit).
A vector 2 of float passes as 'd' register.
A vector 4 of float passes as 'q' register.
This change copies the float into the first entry of a vector 2
and passes that. The optimizer removes the extra copy, allowing
the single float to use referenced as
Test: LibYUVPlanarTest.TestByteToFloat
Bug: libyuv:786
Change-Id: I8773c5bae043c7b84e1d1db7fdea6731aa0b1323
Reviewed-on: https://chromium-review.googlesource.com/973984
Commit-Queue: Frank Barchard <fbarchard@chromium.org>
Reviewed-by: Miguel Casas <mcasas@chromium.org>
Because of the android sdk managed by CIPD (see go/use-adjective-apis),
its deps repo ndk needs to be relocated, as well as hooked by the root
DEPS instead of recursedeps. This CL addes android ndk deps in
libyuv/DEPS.
Bug: chromium:659808
Change-Id: I3d83c06d108d131ea1809c79955fae39d6cc737d
Reviewed-on: https://chromium-review.googlesource.com/858433
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>
The current documentation shows a debug build.
When you attempt that an assert is triggered suggesting
a release build. Update the documentation to reflect that.
TBR=kjellander@chromium.org
BUG=libyuv:731
TEST=gn gen out/Deb^C "--args=is_debug=true is_msan=true"
Change-Id: Ib78e3a7859aa391ac359fa38234aaef0554d0df4
Reviewed-on: https://chromium-review.googlesource.com/663882
Reviewed-by: Cheng Wang <wangcheng@google.com>
Due to legacy reasons, libyuv uses a root_dir variable in the DEPS file.
It was used to make the bots checkout into a 'src' dir instead of 'libyuv',
in order to get some tools working that had hard-coded assumptions on the name
'src' of the top-level directory. This changes all those dirs to be named
'src', which is needed to get tools_libyuv/autoroller/roll_deps.py to work
while keeping the buildbot infrastructure working.
BUG=libyuv:690
TBR=fbarchard@chromium.org
Change-Id: Ia138264d2576e3a9db95efa3de72a14531c92752
Reviewed-on: https://chromium-review.googlesource.com/447913
Reviewed-by: Frank Barchard <fbarchard@google.com>
This changes libyuv to use the DEPS file for pulling
down all dependencies (thus no Chromium checkout is needed any more).
Add tools_libyuv directory to contain libyuv-specific tools
(needed to avoid name collision with the now DEPSed tools/ directory
of Chromium, which is needed by the toolchain).
Add tools_libyuv/autoroller/roll_deps.py script to automatically
roll all entries in the DEPS file (copied from WebRTC).
third_party/ is now DEPSed as well, including the gtest configuration
headers that used to live inside the libyuv repo.
Add PRESUBMIT.py with a few simple checks + execution of PyLint and
Python unit tests. For PyLint a pylintrc file was also added.
Valgrind in tools_libyuv/valgrind was updated to make PRESUBMIT.py pass
and remove old tsan suppressions (not used).
Removed util/android/test_runner.py since it's no longer needed.
Buildbot changes in https://chromium-review.googlesource.com/436464
are needed for the Memcheck bot to go green.
BUG=libyuv:676
NOTRY=True
Change-Id: Ib86fea2905a1656bba2933703ce5a59d29d8db6b
Reviewed-on: https://chromium-review.googlesource.com/436264
Commit-Queue: Henrik Kjellander <kjellander@chromium.org>
Reviewed-by: Frank Barchard <fbarchard@google.com>
ARGBToUV_C and ARGBToUVJ_C are generated functions with subtle
difference in rounding. Adding comment to make them easier to find.
TBR=kjellander@chromium.org
BUG=libyuv:634
TEST=untested
Change-Id: I9912d256a1e04c58475d33bdb472c37484f6cab9
Reviewed-on: https://chromium-review.googlesource.com/434980
Reviewed-by: Frank Barchard <fbarchard@google.com>
Commit-Queue: Frank Barchard <fbarchard@google.com>
Optimize max enables O2 for official builds. Normally release builds
are O2 but the official build is Os, affecting performance.
The GYP file was previously updated to enable optimize max,
which enables ltcg and O2.
Documentation updated to show GN builds in docs/getting_started.md
BUG=libyuv:642
R=kjellander@chromium.org
Review URL: https://codereview.chromium.org/2386093003 .
As per the preparation patch added in Chromium sources at,
2150943003: Add MIPS SIMD Arch (MSA) build flags for GYP/GN builds
This patch adds first MSA optimized function in libYUV project.
BUG=libyuv:634
R=fbarchard@google.com
Review URL: https://codereview.chromium.org/2285683002 .
cpu_info_ is zero for uninitialized state and all bits are off, disabling all cpu optimizations.
the 1 bit indicates cpu_info_ is initialized avoiding calling the detection code again for performance.
MaskCpuFlags initializes the cpu ignoring existing flags, then masks with the supplied flags and stores to cpu_info_.
As a mask, -1 has no effect, enabling all cpu features that were detected, but nothing that wasnt detected.
Setting to 0 will cause the next call to re-initialize the cpu, which is same as enabling all features.
Setting mask to 1 will turn off all cpu features but keep the initialized bit on, so the next detection call wont reinitialize and the cpu features are all disabled.
So normal behavior for command line and programatic masking is:
1 = C
-1 = SIMD
TBR=harryjin@google.com
BUG=libyuv:600
TESTED=out64/Release/bin/run_libyuv_unittest -s libyuv_unittest --verbose --release --gtest_filter=*ARGBExtractAlpha* -a "--libyuv_width=1280 --libyuv_height=720 --libyuv_repeat=9999 --libyuv_flags=1 --libyuv_cpu_info=1"
Review URL: https://codereview.chromium.org/2042933002 .