The sum of floats can optimize differently with vectorization, producing
a different result between NEON and C.
Adjust the unittest to allow for some difference in the sum.
The NEON version is 8 samples at a time, so the test now rounds up
the number of values to multiple of 8.
TBR=kjellander@chromium.org
Bug: libyuv:717
Test: LibYUVPlanarTest.TestScaleSumSamples_Opt
Change-Id: I2a0783780c7e0f240f7a8e4700b2a4d3e6b52d87
Reviewed-on: https://chromium-review.googlesource.com/673708
Reviewed-by: Cheng Wang <wangcheng@google.com>
In cross builds of chrome/win, the host and target toolchains currently
have the same name. To fix this, rename clang_x64 to win_clang_x64.
Because the toolchain name is also referenced in libyuv, this requires
a five-sided change:
1. Introduce variable containing the toolchain name in src.git
2. Change libyuv to refer to the variable
3. Rename toolchain in src.git (including in the newly introduced var)
4* Let libyuv refer to the new name directly
5. Remove variable again
(See also https://codereview.chromium.org/2463143002)
Bug: 748501
Change-Id: I89fdf1503f1a57992a8336026d4c8d767685d53f
Reviewed-on: https://chromium-review.googlesource.com/585306
Commit-Queue: Nico Weber <thakis@chromium.org>
Reviewed-by: Nico Weber <thakis@chromium.org>
In cross builds of chrome/win, the host and target toolchains currently
have the same name. To fix this, rename clang_x64 to win_clang_x64.
Because the toolchain name is also referenced in libyuv, this requires
a five-sided change:
1. Introduce variable containing the toolchain name in src.git
2* Change libyuv to refer to the variable
3. Rename toolchain in src.git (including in the newly introduced var)
4. Let libyuv refer to the new name directly
5. Remove variable again
(See also https://codereview.chromium.org/2463143002)
TBR=fbarchard
Bug: 748501
Change-Id: Id8398ab5c4615c7c33dfa5ec793fdc8c0a717e57
Reviewed-on: https://chromium-review.googlesource.com/585307
Reviewed-by: Nico Weber <thakis@chromium.org>
Reviewed-by: Frank Barchard <fbarchard@google.com>
Detect the compiler's support of C11 atomics, and use C11 atomics when
available.
Note that libyuv::MaskCpuFlags() is still not thread-safe.
BUG=libyuv:641
TEST= cpu_thread_test.cc adds a pthread based test
R=wangcheng@google.com
Change-Id: If05b1e16da833105a0159ed67ef20f4e61bc7abd
Reviewed-on: https://chromium-review.googlesource.com/510079
Commit-Queue: Frank Barchard <fbarchard@google.com>
Reviewed-by: Cheng Wang <wangcheng@google.com>
BUG=libyuv:701
TEST=built and disassembled for aarch64
R=kjellander@chromium.org
Change-Id: I7712b1c7934e5dfb55fda1fa7c8405c32d6964ce
Reviewed-on: https://chromium-review.googlesource.com/495327
Reviewed-by: Henrik Kjellander <kjellander@chromium.org>
Reviewed-by: Cheng Wang <wangcheng@google.com>
When libyuv was changed to compile with clang-cl this also cause libjpeg
to be compiled with clang-cl, which means that it was being compiled
twice. This is generally a bad practice, it was causing duplicate symbol
warnings in some builds, and it slows builds slightly. This change
reduces the number of build steps with the default gn settings on
Win64 builds by 71 (currently from 47,200 to 47,129).
See this change that change libyuv's compilation:
https://chromium-review.googlesource.com/c/446667/
BUG=706627
Change-Id: I13e2d4ff8511350901af10f7443f3f4b89cc2499
Reviewed-on: https://chromium-review.googlesource.com/456651
Reviewed-by: Nico Weber <thakis@chromium.org>
Reviewed-by: Henrik Kjellander <kjellander@chromium.org>
Commit-Queue: Bruce Dawson <brucedawson@chromium.org>
Without this, `gn gen --check` for Chromium would fail with errors like:
$ gn gen --check out/gn
ERROR at //cc/resources/video_resource_updater.cc:25:11: Can't include
this header from here.
#include "third_party/libyuv/include/libyuv.h"
^----------------------------------
The target:
//cc:cc
is including a file from the target:
//third_party/libyuv:libyuv_internal
[...]
Dependency chain (there may also be others):
//cc:cc -->
//third_party/libyuv:libyuv --[private]-->
//third_party/libyuv:libyuv_internal
BUG=libyuv:685, chromium:692600
Change-Id: I5e5bde2f0e4802d70bfd438793eb2460437398ee
Reviewed-on: https://chromium-review.googlesource.com/449934
Reviewed-by: Nico Weber <thakis@chromium.org>
Reviewed-by: Henrik Kjellander <kjellander@chromium.org>
Commit-Queue: Nico Weber <thakis@chromium.org>
Halffloats have a limited range. It shouldnt normally come up, but if the scale value passed in produces a small value, the half floats will be denormals, which are slow and/or flust to zero. This test ensures they behave the same in C and SIMD and tests the performance of denormals.
TEST=TestHalfFloatPlane_denormal
BUG=libyuv:560
R=hubbe@chromium.org
Review URL: https://codereview.chromium.org/2424233004 .
This reduces the number of objects when not specifying a
build target during compile. This is especially significant for Android
where the number of objects decreases from 3322 to 1761.
BUG=libyuv:644
R=fbarchard@google.com
Review URL: https://codereview.chromium.org/2395743002 .
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 .
Fix for duplicate define
../../third_party/libyuv/include/libyuv/scale_row.h:29:9: error: 'LIBYUV_DISABLE_X86' macro redefined [-Werror,-Wmacro-redefined]
^
GYP version relys on headers disabling the optimization.
This CL does the same for BUILD.gn
TBR=kjellander@chromium.org
BUG=libyuv:625
Review URL: https://codereview.chromium.org/2149823003 .
previously gyp enabled
'chromium_code': 1,
for stricter warnings, but GN disabled warnings:
configs -= [ "//build/config/compiler:chromium_code" ]
configs += [ "//build/config/compiler:no_chromium_code" ]
This CL enables strict warnings for GN as well as GYP.
R=rsesek@chromium.org
BUG=libyuv:617
Review URL: https://codereview.chromium.org/2130583003 .
Add dependencies and move the neon target to only be
specified for ARM builds so a standalone GN build can be
performed.
TESTED=Ran:
gn gen out/Release --args=is_debug=false
ninja -C out/Release
gn gen out/Debug --args=is_debug=true
ninja -C out/Debug
gn gen out/Debug --args="is_debug=true os=\"android\" "cpu_arch=\"arm\""
ninja -C out/Debug
gn gen out/Release --args="is_debug=false os=\"android\" "cpu_arch=\"arm\""
ninja -C out/Release
R=fbarchard@google.com
Review URL: https://webrtc-codereview.appspot.com/42289004
git-svn-id: http://libyuv.googlecode.com/svn/trunk@1317 16f28f9a-4ce2-e073-06de-1de4eb20be90