1893 Commits

Author SHA1 Message Date
Manojkumar Bhosale
2621c91bf1 Add MSA optimized HammingDistance and SumSquareError functions
TBR=kjellander@chromium.org
R=fbarchard@google.com

Bug:libyuv:634
Change-Id: Id0126ba5aff38817525b1efa6044f1dc2cfa1a36
Reviewed-on: https://chromium-review.googlesource.com/625739
Reviewed-by: Frank Barchard <fbarchard@google.com>
2017-09-05 21:32:33 +00:00
Frank Barchard
0acc67712f clang format / lint cleanup for arm scale functions
TBR=kjellander@chromium.org
BUG=libyuv:725
TEST=lint

Change-Id: I76f777427f9b1458faba12796fb0011d8e3228d5
Reviewed-on: https://chromium-review.googlesource.com/646586
Reviewed-by: Cheng Wang <wangcheng@google.com>
2017-08-31 22:41:08 +00:00
Frank Barchard
a826dd7112 ARGBScaleDown by 2 with nearest neighbor optimized
TBR=kjellander@chromium.org
BUG=libyuv:723
TEST=ScaleDownBy2_None

Change-Id: I6861e62d3a67dde916b87fdc46eb02f2b4ee9f17
Reviewed-on: https://chromium-review.googlesource.com/644149
Reviewed-by: Frank Barchard <fbarchard@google.com>
Reviewed-by: Cheng Wang <wangcheng@google.com>
2017-08-30 23:22:14 +00:00
Frank Barchard
1c85f98846 Scale down by 2 linear use 'half add' to average pixels.
Use ld2 to load even and odd pixels into different registers
and hadd to half add them to each other.

Previously used paired and shift.

TBR=kjellander@chromium.org
BUG=libyuv:723
TEST=ScaleDownBy2_Linear

Change-Id: I3ec72bcf7d4c746837217496c301eb4e4ad963cf
Reviewed-on: https://chromium-review.googlesource.com/644113
Reviewed-by: Cheng Wang <wangcheng@google.com>
2017-08-30 22:10:32 +00:00
Frank Barchard
e200738d82 Scale Down by 2 use ld2 and urhadd
urhadd is a rounded average.  Linear filter wants to average
horizontally, so use ld2 to separate even and odd pixels.

TBR=jkellander@chromium.org
BUG=None
TEST=LibYUVScaleTest.*ScaleDownBy2*

Change-Id: Id667288a030e72ce8e1c1d6719b69c555c0db063
Reviewed-on: https://chromium-review.googlesource.com/642448
Commit-Queue: Frank Barchard <fbarchard@google.com>
Reviewed-by: Cheng Wang <wangcheng@google.com>
2017-08-30 01:18:11 +00:00
Manojkumar Bhosale
b6e8e9aa97 Add MSA optimized HalfFloatRow function
TBR=kjellander@chromium.org
R=fbarchard@google.com

Bug:libyuv:634
Change-Id: I54a2c57d66093b887c8ba31fd7a21a102165393a
Reviewed-on: https://chromium-review.googlesource.com/628557
Reviewed-by: Frank Barchard <fbarchard@google.com>
2017-08-29 18:40:08 +00:00
Frank Barchard
f0a9d6d206 Gaussian reorder for benefit of A73
Roughly. instead of 4 loads and 8 multiples, use 1 load and 2 multiples
4 times over.  The original code, as with the C code from clang and gcc,
did all the loads, then all the math, then the store.  The new code
does a load, then the math, then the next load, etc.
This schedules better on current arm 64 cpus.
Number of registers also reduced, reusing the same registers.

HiSilicon ARM A73:

Now
TestGaussRow_Opt (890 ms)
TestGaussCol_Opt (571 ms)

Was
TestGaussRow_Opt (1061 ms)
TestGaussCol_Opt (595 ms)

Qualcomm 821 (Pixel):

Now
TestGaussRow_Opt (571 ms)
TestGaussCol_Opt (474 ms)

Was
TestGaussRow_Opt (751 ms)
TestGaussCol_Opt (520 ms)

TBR=kjellander@chromium.org
BUG=libyuv:719
TEST=LibYUVPlanarTest.TestGaussRow_Opt

Reviewed-on: https://chromium-review.googlesource.com/627478
Reviewed-by: Cheng Wang <wangcheng@google.com>
Reviewed-by: Frank Barchard <fbarchard@google.com>
Change-Id: I5ec81191d460801f0d4a89f0384f89925ff036de
Reviewed-on: https://chromium-review.googlesource.com/634448
Commit-Queue: Frank Barchard <fbarchard@google.com>
2017-08-25 19:00:05 +00:00
Frank Barchard
ad2409443c GaussRow_NEON from int to short
[ RUN      ] LibYUVPlanarTest.TestGaussRow_Opt
 [       OK ] LibYUVPlanarTest.TestGaussRow_Opt (601 ms)
 [ RUN      ] LibYUVPlanarTest.TestGaussCol_Opt
 [       OK ] LibYUVPlanarTest.TestGaussCol_Opt (522 ms)

TBR=kjellander@chromium.org
BUG=libyuv:719
TEST=LibYUVPlanarTest.TestGaussRow_Opt

Change-Id: I1242b98672538e889f3ab48f215d6dabc7144ea7
Reviewed-on: https://chromium-review.googlesource.com/627478
Reviewed-by: Cheng Wang <wangcheng@google.com>
Reviewed-by: Frank Barchard <fbarchard@google.com>
2017-08-24 01:09:23 +00:00
Frank Barchard
1cc539f7d6 GaussCol_NEON resample from short to int
Old NEON
LibYUVPlanarTest.TestGaussCol_Opt (916 ms)

New NEON
LibYUVPlanarTest.TestGaussCol_Opt (520 ms)

C vectorized
LibYUVPlanarTest.TestGaussCol_Opt (739 ms)

TBR=kjellander@chromium.org
BUG=libyuv:719
TEST=LibYUVPlanarTest.TestGaussCol_Opt

Change-Id: I863b66f700f7a71fcb08a2eabb03240fdaf8a238
Reviewed-on: https://chromium-review.googlesource.com/626938
Reviewed-by: Cheng Wang <wangcheng@google.com>
2017-08-22 23:07:17 +00:00
Frank Barchard
c5bad809b1 Gauss unittest, Scale comments for neon64 half size updated
[ RUN      ] LibYUVPlanarTest.TestGaussRow_Opt
[       OK ] LibYUVPlanarTest.TestGaussRow_Opt (1274 ms)
[ RUN      ] LibYUVPlanarTest.TestGaussCol_Opt
[       OK ] LibYUVPlanarTest.TestGaussCol_Opt (916 ms)

TBR=kjellander@chromium.org
BUG=libyuv:719
TEST=LibYUVPlanarTest.TestGaussRow_Opt
Change-Id: Id480f3870c40c2b40dfb9f072cb7118ebad41afc
Reviewed-on: https://chromium-review.googlesource.com/624701
Reviewed-by: Cheng Wang <wangcheng@google.com>
2017-08-21 23:41:46 +00:00
Frank Barchard
0c957d183e Gaussian blur NEON optimized
TBR=kjellander@chromium.org
BUG=libyuv:719
TEST=TestGaussCol_NEON

Change-Id: I52cb6dbfd0cab4a30205c93b6a528ef49e9ab529
Reviewed-on: https://chromium-review.googlesource.com/621708
Reviewed-by: Cheng Wang <wangcheng@google.com>
2017-08-21 21:18:32 +00:00
Frank Barchard
8cd3e4f3f2 Add MSA optimized ScaleFilterCols, ScaleARGBCols, ScaleARGBFilterCols and ScaleRowDown34 functions
TBR=kjellander@chromium.org
R=fbarchard@google.com

Bug:libyuv:634
Change-Id: Ib139b9701fc67e24d27a6886377c0cb8b2773fda
Reviewed-on: https://chromium-review.googlesource.com/620791
Reviewed-by: Frank Barchard <fbarchard@google.com>
2017-08-18 17:23:27 +00:00
Frank Barchard
78e44628c6 Add MSA optimized SplitUV, Set, MirrorUV, SobelX and SobelY row functions.
TBR=kjellander@chromium.org
R=fbarchard@google.com

Bug:libyuv:634
Change-Id: Ie2342f841f1bb8469fc4631b784eddd804f5d53e
Reviewed-on: https://chromium-review.googlesource.com/616765
Reviewed-by: Frank Barchard <fbarchard@google.com>
2017-08-17 18:39:22 +00:00
Frank Barchard
bb17da97cf Test C vs NEON for ScaleDown2Box_16
TBR=kjellander@chromium.org
BUG=libyuv:718
TEST=LibYUVScaleTest.TestScaleRowDown2Box_16

Change-Id: Ic74d29d6f14983ff26e8af541ef702a0f8bf3f17
Reviewed-on: https://chromium-review.googlesource.com/616189
Reviewed-by: Cheng Wang <wangcheng@google.com>
2017-08-16 22:18:48 +00:00
Frank Barchard
7e59ee4c75 Upsample 8x2 pixels to 16x1 with bilinear filtering
Downsample 16x2 to 8x1 with box filtering

[ RUN      ] LibYUVScaleTest.TestScaleRowUp2_16
[       OK ] LibYUVScaleTest.TestScaleRowUp2_16 (579 ms)
[ RUN      ] LibYUVScaleTest.TestScaleRowDown2Box_16
[       OK ] LibYUVScaleTest.TestScaleRowDown2Box_16 (329 ms)
[----------] 2 tests from LibYUVScaleTest (909 ms total)

TBR=kjellander@chromium.org
BUG=libyuv:718
TEST=LibYUVScaleTest.TestScaleRowUp2_16 and LibYUVScaleTest.TestScaleRowDown2Box_16

Change-Id: I457d44123f2751e5f71bf3935401fff74b8e9db2
Reviewed-on: https://chromium-review.googlesource.com/608876
Reviewed-by: Cheng Wang <wangcheng@google.com>
2017-08-15 22:28:15 +00:00
Henrik Kjellander
9508c3e70b Fix Valgrind by restoring scripts deleted in Chroium.
Copy Valgrind scripts that was deleted from Chromium's tools/ to fix the Memcheck bot:
    valgrind/chrome_tests.bat
    valgrind/chrome_tests.py
    valgrind/chrome_tests.sh
    valgrind/common.py
    valgrind/gdb_helper.py
    valgrind/locate_valgrind.sh
    valgrind/memcheck_analyze.py
    valgrind/valgrind.gni
    valgrind/valgrind.sh
    valgrind/valgrind_test.py

valgrind_test.py was stripped of its Mac and Dr Memory specific parts, which
we don't use. There's still more cleanup to do, tracked in bugs.webrc.org/7849.

This is similar to changes in https://codereview.webrtc.org/2945753002.

BUG=libyuv:714
NOTRY=True

Change-Id: Ia6ba9bd3d3fca6f2ebe0e4f30e1eb39bb1a66813
Reviewed-on: https://chromium-review.googlesource.com/615162
Reviewed-by: Henrik Kjellander <kjellander@chromium.org>
Commit-Queue: Henrik Kjellander <kjellander@chromium.org>
2017-08-15 08:51:37 +00:00
Henrik Kjellander
9079966fca Fix autoroller in accordance to upstream change
This change broke libyuv's presubmit: e79ddeaabf%5E%21/
GClientKeywords has been removed and replaced with a more direct substitution.
This is similar to https://codereview.webrtc.org/2989603002

BUG=None
NOTRY=True
TBR=fbarchard@google.com

Change-Id: I5cb1c18bc72ac1354d5d69f3c9f93cc61841c409
Reviewed-on: https://chromium-review.googlesource.com/615161
Reviewed-by: Henrik Kjellander <kjellander@chromium.org>
Commit-Queue: Henrik Kjellander <kjellander@chromium.org>
2017-08-15 07:42:44 +00:00
Frank Barchard
56bbcdf422 Reintroduce the max version of scale
add ScaleMaxSamples_NEON function with max
done on original values.

TBR=kjellander@chromium.org
BUG=libyuv:717
TEST=LibYUVPlanarTest.TestScaleMaxSamples_Opt

Change-Id: Id99338860782b10ffd24f66242eb42014c2e229e
Reviewed-on: https://chromium-review.googlesource.com/614685
Reviewed-by: Frank Barchard <fbarchard@google.com>
Reviewed-by: Cheng Wang <wangcheng@google.com>
2017-08-14 23:33:56 +00:00
Manojkumar Bhosale
dbd7c1a9c5 Add MSA optimized ARGBExtractAlpha, ARGBBlend, ARGBQuantize and ARGBColorMatrix row functions
TBR=kjellander@chromium.org
R=fbarchard@google.com

Bug:libyuv:634
Change-Id: I17bd3f87336f613ad363af7d7b9d7af49d725e56
Reviewed-on: https://chromium-review.googlesource.com/613100
Reviewed-by: Frank Barchard <fbarchard@google.com>
2017-08-14 17:38:31 +00:00
Frank Barchard
83ca1abe09 Change ScaleSumSamples to return Sum of Squares
TBR=kjellander@chromium.org
BUG=libyuv:717
TEST=LibYUVPlanarTest.TestScaleSumSamples_Opt

Change-Id: I5208666f3968c5c4b0f1b0c951f24216d78ee3fe
Reviewed-on: https://chromium-review.googlesource.com/607184
Reviewed-by: Cheng Wang <wangcheng@google.com>
2017-08-09 22:19:45 +00:00
Frank Barchard
8676ad7004 scale float samples and return max value
BUG=libyuv:717
TEST=ScaleSum unittest to compare C vs Arm implementation
TBR=kjellander@chromium.org

Change-Id: Iaa7af5547d979aad4722f868d31b405340115748
Reviewed-on: https://chromium-review.googlesource.com/600534
Reviewed-by: Cheng Wang <wangcheng@google.com>
2017-08-04 23:34:30 +00:00
Frank Barchard
27036e33e8 Revert "include <new> header for benefit of new clang builds"
This reverts commit 1dda4cb0b7bd564e646d6ec2efee497fcd7146ca.

Reason for revert: build error on jpeg FILE

Original change's description:
> include <new> header for benefit of new clang builds
> 
> TBR=kjellander@chromium.org
> BUG=libyuv:712
> TEST=local builds still work
> 
> Change-Id: I040e8edc40aafd820d2a29629fe7aec5c049bc6b
> Reviewed-on: https://chromium-review.googlesource.com/576971
> Reviewed-by: Frank Barchard <fbarchard@google.com>
> Commit-Queue: Frank Barchard <fbarchard@google.com>

TBR=kjellander@chromium.org,fbarchard@google.com

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug: libyuv:712
Change-Id: I4cf4e26eadb476017dc95e6c9578092204f088a3
Reviewed-on: https://chromium-review.googlesource.com/601211
Commit-Queue: Frank Barchard <fbarchard@google.com>
Reviewed-by: Frank Barchard <fbarchard@google.com>
2017-08-03 22:03:47 +00:00
Frank Barchard
6d083e2d12 clang 6 build disable some msa functions
R=kjellander@chromium.org

Bug: libyuv:715
Test: gn gen out/Release "--args=is_debug=false target_os=\"android\" target_cpu=\"mips64el\" mips_arch_variant=\"r6\" mips_use_msa=true is_component_build=true is_clang=true"
Change-Id: Ia3943b0afc02e05a8bc32350719b296b0b9d5479
Reviewed-on: https://chromium-review.googlesource.com/592720
Reviewed-by: Cheng Wang <wangcheng@google.com>
2017-08-03 17:44:35 +00:00
Frank Barchard
cd2f88665f add 'From': GClientKeywords.FromImpl to autoroll
Take change from webrtc into libyuv autoroll
BUG=libyuv:716
TEST=tools_libyuv/autoroller/roll_deps.py
TBR=kjellander@chromium.org

Change-Id: I81b1eed114b982e336f2e209d7d825094e584295
Reviewed-on: https://chromium-review.googlesource.com/596472
Reviewed-by: Frank Barchard <fbarchard@google.com>
Commit-Queue: Frank Barchard <fbarchard@google.com>
2017-08-02 02:06:28 +00:00
Henrik Kjellander
cedb31c6ca Remove invalid suggestion from roll_deps.py error message.
BUG=libyuv:710
NOTRY=True

Change-Id: I47c80980a6ed8bcfc247e75f3936f028576a6c5a
Reviewed-on: https://chromium-review.googlesource.com/584846
Reviewed-by: Frank Barchard <fbarchard@google.com>
Commit-Queue: Henrik Kjellander <kjellander@chromium.org>
2017-07-26 20:05:24 +00:00
Nico Weber
56022ef77f win: Rename clang_x64 to win_clang_x64 in build/toolchain/win, step 4/5.
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>
2017-07-25 19:59:42 +00:00
Nico Weber
58d3392ad3 win: Rename clang_x64 to win_clang_x64 in build/toolchain/win, step 2/5.
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>
2017-07-25 17:28:31 +00:00
Frank Barchard
fba90197f7 Roll chromium_revision c138801d02..da6245e7c4 (487352:488751)
Change log: c138801d02..da6245e7c4
Full diff: c138801d02..da6245e7c4

Changed dependencies:
* src/base: 5b2c419308..8c06e7a9f6
* src/build: 1808a907ce..e3c0667f11
* src/ios: bff0ead181..e5a58b0b43
* src/testing: aac324832e..ebf1c4622e
* src/third_party: 1b11b0e214..d58cf433a5
* src/third_party/catapult: b0acf6c12b..9629af7533
* src/third_party/icu: dfa798fe69..1fec0c83e9
* src/tools: ec8ceaef71..1397f0ed8b
* src/tools/gyp: eb296f67da..d61a9397e6
DEPS diff: c138801d02..da6245e7c4/DEPS

No update to Clang.

TBR=kjellander@chromium.org
BUG=libyuv:710
TEST=linux and android builds work locally

Change-Id: I6ea35abb7c85c08dec1648dd12041d6ed994b04c
Reviewed-on: https://chromium-review.googlesource.com/582307
Reviewed-by: Frank Barchard <fbarchard@google.com>
2017-07-21 22:01:41 +00:00
Frank Barchard
d8136924bd Rename convert to yuvconvert for linux.mk
TBR=kjellander@chromium.org
BUG=None
TEST=make -f linux.mk

Change-Id: I747c2eb6ed03cacddf3265e65088472507f3436c
Reviewed-on: https://chromium-review.googlesource.com/581874
Commit-Queue: Frank Barchard <fbarchard@google.com>
Reviewed-by: Frank Barchard <fbarchard@google.com>
2017-07-21 19:05:11 +00:00
Frank Barchard
5f00523073 Remove deprecated macOS SDK overrides.
The same overrides now live in .gn.

TBR=kjellander@chromium.org
Bug:chromium:669240
Change-Id: Ifaeb3b612571c3594f1e2279b4f871b7fd3e8d69
Reviewed-on: https://chromium-review.googlesource.com/572080
Reviewed-by: Frank Barchard <fbarchard@google.com>
2017-07-20 22:26:41 +00:00
Frank Barchard
d0ed025447 add exe_and_shlib_deps dependency for libc++ new[]
TBR=kjellander@chromium.org
BUG=libyuv:712
TEST=libyuv try bots build

Change-Id: Ibe2ff9ac557d5086566941d93f71d1b8048dfb58
Reviewed-on: https://chromium-review.googlesource.com/579663
Reviewed-by: Nico Weber <thakis@chromium.org>
Reviewed-by: Frank Barchard <fbarchard@google.com>
2017-07-20 21:17:25 +00:00
Frank Barchard
9288b884b6 Roll chromium_revision 964fc7fe50..c138801d02 (478724:487352)
Change log: 964fc7fe50..c138801d02
Full diff: 964fc7fe50..c138801d02

Changed dependencies:
* src/base: 7830ef61f5..5b2c419308
* src/build: b887a61b49..1808a907ce
* src/buildtools: b53a03df32..5ad14542a6
* src/ios: 4243f190b3..bff0ead181
* src/testing: 4d1ed658b7..aac324832e
* src/third_party: d09084e5dd..1b11b0e214
* src/third_party/android_tools: https://chromium.googlesource.com/android_tools.git/+log/023e2f6540..e9d4018e14
* src/third_party/catapult: 7ba431f75d..b0acf6c12b
* src/tools: b8af3bf606..ec8ceaef71
* src/tools/swarming_client: af6b06ca68..a56c2b39ca
DEPS diff: 964fc7fe50..c138801d02/DEPS

Clang version changed 303910:307486
Details: 964fc7fe50..c138801d02/tools/clang/scripts/update.py

TBR=kjellander@chromium.org
BUG=libyuv:710, chromium:669240


Change-Id: I117311a0fe61c3bdbf3a966ec2eb55100added51
Reviewed-on: https://chromium-review.googlesource.com/574772
Reviewed-by: Frank Barchard <fbarchard@google.com>
Commit-Queue: Frank Barchard <fbarchard@google.com>
2017-07-19 18:04:24 +00:00
Frank Barchard
1dda4cb0b7 include <new> header for benefit of new clang builds
TBR=kjellander@chromium.org
BUG=libyuv:712
TEST=local builds still work

Change-Id: I040e8edc40aafd820d2a29629fe7aec5c049bc6b
Reviewed-on: https://chromium-review.googlesource.com/576971
Reviewed-by: Frank Barchard <fbarchard@google.com>
Commit-Queue: Frank Barchard <fbarchard@google.com>
2017-07-19 17:47:31 +00:00
Frank Barchard
95a20b677d Update .gn to set a min SDK for macOS via GN.
Currently, libyuv is setting this config via mac_sdk_min_build_override. The old
meechanism is deprecated, but cannot be removed until chromium is updated to no
longer require mac_sdk_min_build_override.

TBR=kjellander@chromium.org
Bug:chromium:740693
Change-Id: I71533c9ef20ac8d7584d50751ac5437da54e2cb5
Reviewed-on: https://chromium-review.googlesource.com/565636
Reviewed-by: Frank Barchard <fbarchard@google.com>
2017-07-13 17:34:42 +00:00
Frank Barchard
db25485ee2 Move compare functions into a unittest class
BUG=None
TEST=LibYUVCompareTest.*
R=jkellander@chromium.org

Change-Id: I3131ca73020f855ead08255d09aa7a846bf0d556
Reviewed-on: https://chromium-review.googlesource.com/540064
Commit-Queue: Frank Barchard <fbarchard@google.com>
Reviewed-by: Henrik Kjellander <kjellander@chromium.org>
2017-06-19 19:39:10 +00:00
Henrik Kjellander
9e920b9c4d Roll chromium_revision ce95e5d83f..964fc7fe50 (465389:478724)
Manual changes:
* Add new third_party/googletest (replaces testing/gtest and testing/gmock).
* Add Android deps third_party/ub-uiautomator and xstream.
* Remove the no longer existing clang_format_merge_driver
* Java 8 had to be installed on the Android builder machines (crbug.com/732529).

Change log: ce95e5d83f..964fc7fe50
Full diff: ce95e5d83f..964fc7fe50

Changed dependencies:
* src/base: f6489f4fd2..7830ef61f5
* src/build: bca1cbe2aa..b887a61b49
* src/buildtools: 88811f48a6..b53a03df32
* src/ios: 9595ed7ed6..4243f190b3
* src/testing: 7b3e681f96..4d1ed658b7
* src/third_party: b28b3325f9..d09084e5dd
* src/third_party/android_tools: https://chromium.googlesource.com/android_tools.git/+log/b65c4776da..023e2f6540
* src/third_party/catapult: e8775f0f64..7ba431f75d
* src/third_party/ced/src: e21eb6aed1..910cca22d8
* src/third_party/icu: b34251f8b7..dfa798fe69
* src/third_party/libjpeg_turbo: 7260e4d8b8..a1750dbc79
* src/tools: 5c327d115e..b8af3bf606
* src/tools/swarming_client: 11e31afa5d..af6b06ca68
DEPS diff: ce95e5d83f..964fc7fe50/DEPS

Clang version changed 299960:303910
Details: ce95e5d83f..964fc7fe50/tools/clang/scripts/update.py

TBR=
BUG=None

Change-Id: I84a5108a48d7cddb71df886cd9cb7e7ed21648ef
Reviewed-on: https://chromium-review.googlesource.com/532013
Commit-Queue: Henrik Kjellander <kjellander@chromium.org>
Reviewed-by: Frank Barchard <fbarchard@google.com>
2017-06-13 06:59:05 +00:00
Frank Barchard
6c94ad13b5 Remove ARM NaCL macros from source
NaCL has been disabled for awhile, so the code
will still build, but only with C versions.
This change removes the MEMACCESS() macros from
Neon and Neon64 source.

BUG=libyuv:702
TEST=try bots build for arm.
R=kjellander@chromium.org

Change-Id: Id581a5c8ff71e18cc69595e7fee9337f97c44a19
Reviewed-on: https://chromium-review.googlesource.com/528332
Reviewed-by: Cheng Wang <wangcheng@google.com>
Commit-Queue: Frank Barchard <fbarchard@google.com>
2017-06-09 22:22:07 +00:00
Frank Barchard
5f94a33e0c Lint fix for C casting for rotation code on arm
instead of casting int to int64, pass the int
and use %w modifier to use the word version of the register.

TBR=kjellander@chromium.org
BUG=libyuv:706
TEST=git cl lint
R=wangcheng@google.com

Change-Id: Iee5a70f04d928903ca8efac00066b8821a465e36
Reviewed-on: https://chromium-review.googlesource.com/528381
Reviewed-by: Cheng Wang <wangcheng@google.com>
Reviewed-by: Frank Barchard <fbarchard@google.com>
2017-06-09 00:51:00 +00:00
Frank Barchard
d981495b42 Hamming Distance using 16 bit accumulators
Summing 16 bit hamming codes restricts the maximum length,
but saves an inner loop instruction.  The outer loop can sum the
values.

32 bit Neon
Now BenchmarkHammingDistance_Opt (78 ms)
Was BenchmarkHammingDistance_Opt (92 ms)

64 bit Neon
Now BenchmarkHammingDistance_Opt (85 ms)
Was BenchmarkHammingDistance_Opt (92 ms)

R=wangcheng@google.com
TBR=kjellander@chromium.org
BUG=libyuv:701
TEST=BenchmarkHammingDistance

Change-Id: Ie40f0eac2f3339c33b833b42af5d394b122066ae
Reviewed-on: https://chromium-review.googlesource.com/526932
Reviewed-by: Frank Barchard <fbarchard@google.com>
Reviewed-by: Cheng Wang <wangcheng@google.com>
Commit-Queue: Frank Barchard <fbarchard@google.com>
2017-06-07 23:23:24 +00:00
Frank Barchard
790e0634a8 Port HammingDistance_NEON 32 bit code to 64 bit
The 32 bit version of HammingDistance_NEON accumulates
using vertical add and paired adds, which takes 3 instructions
instead of 4.
The instructions are also portable between 32 and 64 bit.

Was BenchmarkHammingDistance_Opt (105 ms)
Now BenchmarkHammingDistance_Opt (90 ms)

TBR=kjellander@chromium.org
BUG=libyuv:701
TEST=BenchmarkHammingDistance

BenchmarkHammingDistance_Opt (90 ms)

Change-Id: If9e621e0bd2fe2492a1532056f8a1b451ba53d7e
Reviewed-on: https://chromium-review.googlesource.com/526365
Reviewed-by: Frank Barchard <fbarchard@google.com>
Commit-Queue: Frank Barchard <fbarchard@google.com>
2017-06-07 01:04:35 +00:00
Frank Barchard
47d6eaa377 HammingDistance_NEON optimized looping
BenchmarkHammingDistance_Opt (93 ms)
BenchmarkHammingDistance_C (389 ms)

TBR=kjellander@chromium.org
BUG=libyuv:701
TEST=BenchmarkHammingDistance

Change-Id: I4ba920751eb130cac6a276e441a7c309c495554a
Reviewed-on: https://chromium-review.googlesource.com/526401
Reviewed-by: Frank Barchard <fbarchard@google.com>
Reviewed-by: Cheng Wang <wangcheng@google.com>
Commit-Queue: Frank Barchard <fbarchard@google.com>
2017-06-07 00:09:59 +00:00
Frank Barchard
baf5248242 HammingDistance_NEON ported to 32 bit
TBR=kjellander@chromium.org
BUG=libyuv:701
TEST=BenchmarkHammingDistance

Change-Id: I252efd8a27aa11a0fe7d8030d7c8b57f20f04760
Reviewed-on: https://chromium-review.googlesource.com/525232
Reviewed-by: Frank Barchard <fbarchard@google.com>
Commit-Queue: Frank Barchard <fbarchard@google.com>
2017-06-06 17:58:29 +00:00
Frank Barchard
44abf70187 ScaleDown odd functions adjust math so last pixel is half width source.
existing test passes
out/Release/libyuv_unittest --gtest_filter=*Blend* --libyuv_width=33 --libyuv_height=16

new test added
BUG=libyuv:705
TEST=LibYUVScaleTest.TestScaleOdd

Change-Id: Ica91812aee2e4ed9bcc18df4962b089c2e4ae704
Reviewed-on: https://chromium-review.googlesource.com/524932
Reviewed-by: Cheng Wang <wangcheng@google.com>
Commit-Queue: Frank Barchard <fbarchard@google.com>
2017-06-06 01:37:26 +00:00
Henrik Kjellander
b97406775c Remove duplicated bot linux_msan in cq.cfg.
BUG=None
TBR=fbarchard@chromium.org

Change-Id: Id665a052c0f164ca58ee317ff2cb065c6a67da77
Reviewed-on: https://chromium-review.googlesource.com/521523
Reviewed-by: Henrik Kjellander <kjellander@chromium.org>
2017-06-01 17:58:16 +00:00
Frank Barchard
7bffe5e1c5 lint warning fixes for CpuID
The CpuId function is a wrapper for the intrinsic, or
implemented with inline if unavailable.  It had been
using uint32, but the intrinsics use int, so it was causing
casting and lint warnings.  This change makes the internal
implementation use int.

Casting was also done for xgetbv, and the cast is simply
removed, and is not causing a build error.

MipCpuCaps was doing strlen to check for white space after the
instruction set.  Arm also does this but with a hard coded offset.
This was causing a cast from size_t to int, which produced a lint
warning.  The change removes the white space detect.
In theory the code could be used to detect SSE vs SSE2, and it would
need to check SSE is followed by a space or end of line.  But this
code is only used on Arm and Mips, where there there is one form
of SIMD detected.  e.g. MSA for mips.  If a new instruction set is
added with a similar name, the write space check could be reintroduced.
But its more likely the code can be rewritten to use a better form
of detection by then. Or remove detection and require the instructions

BUG=libyuv:641
TEST=try bots build on all platforms without error and lint is clean

Change-Id: I9f55f8e57bba0f78571bdddbe63b945dea3e8809
Reviewed-on: https://chromium-review.googlesource.com/514524
Commit-Queue: Frank Barchard <fbarchard@google.com>
Reviewed-by: Cheng Wang <wangcheng@google.com>
Reviewed-by: Wan-Teh Chang <wtc@chromium.org>
2017-05-25 22:00:17 +00:00
Henrik Kjellander
ae7e2ef13e Update autoroller after FromImpl was removed from depot tools
In https://chromium-review.googlesource.com/c/509693/ the From
keyword was removed. This update the script to match that (we
also were no longer using it).

BUG=libyuv:704
NOTRY=True

Change-Id: Iccbbfb426a3acd986fbc036672fb51abc2c5d346
Reviewed-on: https://chromium-review.googlesource.com/513908
Reviewed-by: Frank Barchard <fbarchard@google.com>
Commit-Queue: Henrik Kjellander <kjellander@chromium.org>
2017-05-25 06:59:25 +00:00
Frank Barchard
8edd2286fd MaskCpuFlags return cpuinfo so InitCpuFlags can call it
Reduce number of atomic references to cpu_info by making
InitCpuFlags call MaskCpuFlags and return the same value.

BUG=libyuv:641
TEST=libyuv_unittests pass

Change-Id: I5dfff8f7a10671bc8ef3ec0ed6f302791e752faa
Reviewed-on: https://chromium-review.googlesource.com/514145
Commit-Queue: Frank Barchard <fbarchard@google.com>
Reviewed-by: Cheng Wang <wangcheng@google.com>
2017-05-24 22:27:03 +00:00
Frank Barchard
651ccc0c3a Fix data races in libyuv::TestCpuFlag().
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>
2017-05-24 02:09:03 +00:00
Frank Barchard
77f6916da2 use __popcnt for visual c HammingDistance_X86
BUG=libyuv:701
TEST=HammingDistance unittest performance is comparable to x64
R=wangcheng@google.com

Change-Id: I8abe861e086e0162ba4c7ba6f1ef7d1c006cd9d4
Reviewed-on: https://chromium-review.googlesource.com/505454
Reviewed-by: Frank Barchard <fbarchard@google.com>
Commit-Queue: Frank Barchard <fbarchard@google.com>
2017-05-12 22:59:00 +00:00
Frank Barchard
e0615c0e69 Optimize Hamming Distance C code to do 64 bits at a time.
BUG=libyuv:701
TEST=LibYUVBaseTest.BenchmarkHammingDistance_C
R=wangcheng@google.com

Change-Id: I243003b098bea8ef3809298bbec349ed52a43d8c
Reviewed-on: https://chromium-review.googlesource.com/499487
Reviewed-by: Cheng Wang <wangcheng@google.com>
2017-05-12 17:53:52 +00:00