1884 Commits

Author SHA1 Message Date
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
Frank Barchard
bbbf30eecd Remove volatile from variables to improve performance
BUG=libyuv:703
TEST=compile and disassemble.  see registers used not stack.
R=wangcheng@google.com

Change-Id: Iaa07ee5d0c35252994491bb2868276e161149efd
Reviewed-on: https://chromium-review.googlesource.com/500427
Commit-Queue: Frank Barchard <fbarchard@google.com>
Reviewed-by: Cheng Wang <wangcheng@google.com>
2017-05-09 18:14:21 +00:00
Frank Barchard
2136e349da Hamming code difference of 2 memory blocks
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>
2017-05-08 21:37:51 +00:00
Frank Barchard
945ea1b746 mips switch sgtu to sltu for clang in ndk r14
The verion of clang in ndk r14 (3.9) has a built in llvm assembler
that does not have the sgtu pseudo instruction.
sltu is the actual instruction, so switch the 2 operands and use
the instruction instead of the pseudo op.

BUG=libyuv:700
TEST=try bots build mips without error.

Change-Id: I2d5f94f81acbd56cdedea011e7d9308979e19079
Reviewed-on: https://chromium-review.googlesource.com/494026
Reviewed-by: Henrik Kjellander <kjellander@chromium.org>
2017-05-02 21:34:13 +00:00
Vignesh Venkatasubramanian
54289f1bb0 Fix mips build on android ndk r14+
Revert the workaround and fix it properly by passing the
additional necessary flag to the compiler.

BUG=libyuv:700

Change-Id: I1c893a8acb5079decbee6963b689424bf2f99f4f
Reviewed-on: https://chromium-review.googlesource.com/487881
Reviewed-by: Frank Barchard <fbarchard@google.com>
2017-04-26 08:39:55 +00:00
Frank Barchard
3b583396bf Disable CopyRow_MIPS
CopyRow_MIPS produces a compile error on some compilers.

TBR=kjellander@chromium.org
BUG=libyuv:700
TEST=try bots

Change-Id: Ie88f2006ef5cf14bffaf80fd4c0dd1caa409c569
Reviewed-on: https://chromium-review.googlesource.com/486127
Reviewed-by: Frank Barchard <fbarchard@google.com>
2017-04-25 01:31:13 +00:00
Bruce Dawson
996a2bbdb5 Avoid double compiles of libjpeg
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>
2017-04-20 21:02:39 +00:00
Frank Barchard
a4929684c4 Roll chromium_revision da7cc8ca4c..ce95e5d83f (465147:465389)
Change log: da7cc8ca4c..ce95e5d83f
Full diff: da7cc8ca4c..ce95e5d83f

Changed dependencies:
* src/base: 636a52bf9d..f6489f4fd2
* src/build: 15013685bd..bca1cbe2aa
* src/ios: 9d4d917abc..9595ed7ed6
* src/testing: 6885521e31..7b3e681f96
* src/third_party: be0a7d2acc..b28b3325f9
* src/third_party/catapult: 49eb11f63e..e8775f0f64
* src/third_party/robolectric/robolectric: e38b49a12f..2a0b6ba221
* src/tools: 80ce3971a8..5c327d115e
* src/tools/gyp: e7079f0e0e..eb296f67da
DEPS diff: da7cc8ca4c..ce95e5d83f/DEPS

No update to Clang.

TBR=kjellander@chromium.org
BUG=libyuv:697


Change-Id: I34a5b3302ba369718536b1d0aa664f9b089386ca
Reviewed-on: https://chromium-review.googlesource.com/481064
Reviewed-by: Frank Barchard <fbarchard@google.com>
2017-04-18 22:40:59 +00:00
Henrik Kjellander
2d1908c481 Roll chromium_revision 7950721f08..da7cc8ca4c (454907:465147)
Change log: 7950721f08..da7cc8ca4c
Full diff: 7950721f08..da7cc8ca4c

Changed dependencies:
* src/base: d75864a2c5..636a52bf9d
* src/build: bf8911f59b..15013685bd
* src/buildtools: b3771b1935..88811f48a6
* src/ios: 8b8111f841..9d4d917abc
* src/testing: c2c74bc1d1..6885521e31
* src/third_party: 4c0908d22e..be0a7d2acc
* src/third_party/android_tools: https://chromium.googlesource.com/android_tools.git/+log/b43a6a289a..b65c4776da
* src/third_party/catapult: 353ee60a45..49eb11f63e
* src/third_party/ced/src: 368a9cc09a..e21eb6aed1
* src/third_party/icu: 450be73c9e..b34251f8b7
* src/third_party/lss: https://chromium.googlesource.com/linux-syscall-support.git/+log/3f6478ac95..63f24c8221
* src/third_party/robolectric/robolectric: e38b49a12f..2a0b6ba221
* src/tools: 14318cc69b..6412dca2e6
* src/tools/gyp: e7079f0e0e..eb296f67da
DEPS diff: 7950721f08..da7cc8ca4c/DEPS

Clang version changed 296320:299960
Details: 7950721f08..da7cc8ca4c/tools/clang/scripts/update.py

TBR=
BUG=None

Change-Id: Idef4cbd757cc6242b136e5499a21d634ec9f16b6
Reviewed-on: https://chromium-review.googlesource.com/479652
Reviewed-by: Henrik Kjellander <kjellander@chromium.org>
Commit-Queue: Henrik Kjellander <kjellander@chromium.org>
2017-04-18 07:16:19 +00:00
Frank Barchard
fc02cc3806 Add I422ToRGB565
BUG=libyuv:699
TESTED=LibYUVConvertTest.I420ToARGB_RGB565_Opt

Change-Id: I87943bcad056fbbe051301f45c7dc0ae0620c837
Reviewed-on: https://chromium-review.googlesource.com/478578
Reviewed-by: Frank Barchard <fbarchard@google.com>
Commit-Queue: Frank Barchard <fbarchard@google.com>
2017-04-17 17:51:17 +00:00