2088 Commits

Author SHA1 Message Date
Frank Barchard
d694f0a82b Document update for running android apps
Bug: libyuv:803
Test: out/Release/bin/run_libyuv_unittest -v --gtest_filter=*ToRGB565* --libyuv_width=1280 --libyuv_height=720 --libyuv_repeat=999 --libyuv_flags=-1  --libyuv_cpu_info=-1 2>&1 | sortms
Change-Id: I024823752e410e55076cb5c5ec5ca78736848f86
Reviewed-on: https://chromium-review.googlesource.com/1173662
Reviewed-by: Patrik Höglund <phoglund@chromium.org>
Reviewed-by: Mirko Bonadei <mbonadei@chromium.org>
Commit-Queue: Frank Barchard <fbarchard@chromium.org>
2018-08-14 17:40:57 +00:00
Frank Barchard
67eff529ad ubsan fix for 16 bit scaling
Bug: libyuv:813
Test: tested downstream for ubsan.
Change-Id: I28c1d4e815348d051f781c9b7d8197f74905cab7
Reviewed-on: https://chromium-review.googlesource.com/1173721
Reviewed-by: Frank Barchard <fbarchard@chromium.org>
Reviewed-by: Mirko Bonadei <mbonadei@chromium.org>
Commit-Queue: Frank Barchard <fbarchard@chromium.org>
2018-08-14 17:40:44 +00:00
Mike Frysinger
91f0a7504b README: fix doc links
Change-Id: Iffbb35cdda9de495b0612a545893d1b7d5e3cb13
Reviewed-on: https://chromium-review.googlesource.com/1168452
Reviewed-by: Ryan Tseng <hinoka@chromium.org>
Reviewed-by: Patrik Höglund <phoglund@chromium.org>
Commit-Queue: Mike Frysinger <vapier@chromium.org>
2018-08-13 18:28:55 +00:00
lixia zhang
bf69adfd64 libyuv:loongson Correct the optimization of mmi on loongson3a platform.
When loading or storing the data, the unaligned address will greatly degrade
the optimization performance, so non-aligned access instructions are required
on the loongson platform.

Also delete the optimization function:ScaleARGBFilterCols_MMI,
because it degraded the performance.

BUG=libyuv:804
R=fbarchard@chromium.org

Change-Id: If4c15886a21cdcbac7ae8b336292e4549acf1e47
Reviewed-on: https://chromium-review.googlesource.com/1164627
Reviewed-by: Frank Barchard <fbarchard@chromium.org>
Commit-Queue: Frank Barchard <fbarchard@chromium.org>
2018-08-11 09:27:20 +00:00
Frank Barchard
4e666c4354 Add H420ToRGB565 and J420ToRGB565 unittests
Bug: libyuv:812
Test: LibYUVConvertTest.H420ToRGB565_Opt
Change-Id: Ie85ece74e0bc2b5f789cfcde76703fff6474c0e0
Reviewed-on: https://chromium-review.googlesource.com/1171380
Reviewed-by: Mirko Bonadei <mbonadei@chromium.org>
Reviewed-by: Frank Barchard <fbarchard@chromium.org>
2018-08-10 21:08:46 +00:00
Chong Zhang
b6b1c273a2 libyuv: choose matrix for YUV to RGB565 conversion
bug: 109762970
Change-Id: Iccfdc5dded2dc7695f8a7795b2f32b6401efea0d
Reviewed-on: https://chromium-review.googlesource.com/1169687
Commit-Queue: Frank Barchard <fbarchard@chromium.org>
Reviewed-by: Frank Barchard <fbarchard@chromium.org>
2018-08-10 19:16:34 +00:00
Patrik Höglund
c417d5773b Roll chromium_revision 80f0c55706..35b72bf255 (536678:582080)
Change log: 80f0c55706..35b72bf255
Full diff: 80f0c55706..35b72bf255

Changed dependencies:
* src/base: https://chromium.googlesource.com/
  chromium/src/base/+log/733a32608c..6c0497f398
* src/build: https://chromium.googlesource.com/
  chromium/src/build/+log/8cb5352322..f79db013c7
* src/buildtools: https://chromium.googlesource.com/
  chromium/buildtools.git/+log/5941c1b3df..9a90d9aaad
* src/ios: https://chromium.googlesource.com/
  chromium/src/ios/+log/299ef76e84..8e45eb00df
* src/testing: https://chromium.googlesource.com/
  chromium/src/testing/+log/60b2c69b17..d2fde4ae5b
* src/third_party: https://chromium.googlesource.com/
  chromium/src/third_party/+log/e755204b7a..f931bb4f2b
* src/third_party/android_tools: https://chromium.googlesource.com/
  android_tools.git/+log/c22a664c39..130499e252
* src/third_party/catapult: https://chromium.googlesource.com/
  catapult.git/+log/f3ce003c2b..0d25dda9b1
* src/third_party/freetype/src: https://chromium.googlesource.com/
  chromium/src/third_party/freetype2.git/+log/a44e20879c..578bcf103a
* src/third_party/googletest/src: https://chromium.googlesource.com/
  external/github.com/google/googletest.git/+log/ba96d0b116..d526632675
* src/third_party/harfbuzz-ng/src: https://chromium.googlesource.com/
  external/github.com/harfbuzz/harfbuzz.git/+log/957e775663..2b76767bf5
* src/third_party/icu: https://chromium.googlesource.com/
  chromium/deps/icu.git/+log/d888fd2a1b..297a4dd02b
* src/third_party/mockito/src: https://chromium.googlesource.com/
  external/mockito/mockito.git/+log/de83ad4598..04a2a289a4
* src/third_party/yasm/source/patched-yasm: https://chromium.googlesource.com/
  chromium/deps/yasm/patched-yasm.git/+log/b98114e18d..720b70524a
* src/tools: https://chromium.googlesource.com/
  chromium/src/tools/+log/55c65d8fec..f2c6ed916b
* src/tools/swarming_client: https://chromium.googlesource.com/
  infra/luci/client-py.git/+log/88229872dd..486c9b53c4
DEPS diff: https://chromium.googlesource.com/
  chromium/src/+/80f0c55706..35b72bf255/DEPS

Clang version changed 334100:337439
Details: 80f0c55706..35b72bf255/tools/clang/scripts/update.py

TBR=
BUG=None

Change-Id: Ia18ef8e7dddaf2cea4364027dfe7026bc6e4733c
Reviewed-on: https://chromium-review.googlesource.com/1169812
Commit-Queue: Frank Barchard <fbarchard@chromium.org>
Reviewed-by: Frank Barchard <fbarchard@chromium.org>
Reviewed-by: Patrik Höglund <phoglund@chromium.org>
2018-08-10 19:16:06 +00:00
Patrik Höglund
6b70a8c5f1 Try reordering buckets to work around gerrit tryjob plugin bug
With several buckets, it appears the gerrit tryjobs plugin only
displays the first bucket. In that case we want to display the main
UCI bucket rather than the win stragglers in buildbot.

No-try: True
Tbr: fbarchard@chromium.org
Bug: chromium:869249
Change-Id: I50dcbf668d29becbe493601be8b9db089de78b85
Reviewed-on: https://chromium-review.googlesource.com/1170688
Reviewed-by: Patrik Höglund <phoglund@chromium.org>
Commit-Queue: Patrik Höglund <phoglund@chromium.org>
2018-08-10 08:36:57 +00:00
Patrik Höglund
6e62ff3495 Fix missing brace + incorrect nesting in cq.cfg.
try_job can't be repeated, but buckets can. I think this does what
Ryan intended.

Also add a presubmit so this doesn't happen again.

No-try because CQ is broken, and even if it weren't nothing
would catch errors in cq.cfq directly.

No-try: True
Tbr: fbarchard@chromium.org
Bug: 869249
Change-Id: If84685f93275f5af691fc3fef77881156930b726
Reviewed-on: https://chromium-review.googlesource.com/1169820
Commit-Queue: Patrik Höglund <phoglund@chromium.org>
Reviewed-by: Patrik Höglund <phoglund@chromium.org>
2018-08-10 08:20:15 +00:00
Ryan Tseng
791e7be466 [cq.cfg] Flip all builders (except windows) to LUCI
All builders look WAI now, so flipping.
In particular, the android bots have been migrated in place to LUCI,
so the buildbot varients should no longer work.

No-Try: True
Bug:869249
Change-Id: Iab96cab5d92a106df67fc2458150c0dc93b77fc4
Reviewed-on: https://chromium-review.googlesource.com/1169593
Reviewed-by: Patrik Höglund <phoglund@chromium.org>
Commit-Queue: Patrik Höglund <phoglund@chromium.org>
2018-08-10 06:37:38 +00:00
Patrik Höglund
c349c405a4 Only download Android SDK for android checkouts.
This should solve the bug where LUCI win bots try to download the SDK
and fails.

Bug: chromium:869249
Change-Id: I374ecf6508d6e3978559ec3251b89faaec99edd6
Reviewed-on: https://chromium-review.googlesource.com/1168500
Reviewed-by: Ryan Tseng <hinoka@chromium.org>
2018-08-09 13:04:55 +00:00
Ryan Tseng
eac13700c3 Revert "Add a whitespace.txt file"
This reverts commit 6703fe287670abf0e3473230bd1cdd551ab4107f.

Reason for revert: Builders flipped, triggering first LUCI job

Original change's description:
> Add a whitespace.txt file
> 
> Bug: 869249
> Change-Id: Iab9eeade2427255ce167fb524b11e0e3f691a685
> Reviewed-on: https://chromium-review.googlesource.com/1161382
> Reviewed-by: Frank Barchard <fbarchard@chromium.org>
> Commit-Queue: Ryan Tseng <hinoka@chromium.org>
> Commit-Queue: Frank Barchard <fbarchard@chromium.org>

TBR=hinoka@chromium.org,fbarchard@chromium.org
No-Try: True

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

Bug: 869249
Change-Id: I00a29051b8a1be048afe444cd7811b19c949fd85
Reviewed-on: https://chromium-review.googlesource.com/1167906
Reviewed-by: Ryan Tseng <hinoka@chromium.org>
2018-08-08 21:05:46 +00:00
Martin Storsjö
9b772abf97 Restore the file mode for source files
This was changed in 21be9122aadf7824efe3fc19b2a09ff253a688e1.

Change-Id: I6c04dc92f673557e10c231bd090ec8aa88b6bee4
Reviewed-on: https://chromium-review.googlesource.com/1146183
Reviewed-by: Frank Barchard <fbarchard@chromium.org>
Commit-Queue: Frank Barchard <fbarchard@chromium.org>
2018-08-06 18:53:32 +00:00
Frank Barchard
57de382902 MMI ifdef guards and add source to various build files.
Bug: libyuv:810,libyuv:811
Test: cmake . && make
Change-Id: I521b45ccb6e49ff70823e415efa99fc5b9daad99
Reviewed-on: https://chromium-review.googlesource.com/1162503
Reviewed-by: Johann Koenig <johannkoenig@google.com>
2018-08-03 18:37:23 +00:00
Ryan Tseng
6703fe2876 Add a whitespace.txt file
Bug: 869249
Change-Id: Iab9eeade2427255ce167fb524b11e0e3f691a685
Reviewed-on: https://chromium-review.googlesource.com/1161382
Reviewed-by: Frank Barchard <fbarchard@chromium.org>
Commit-Queue: Ryan Tseng <hinoka@chromium.org>
Commit-Queue: Frank Barchard <fbarchard@chromium.org>
2018-08-02 22:38:10 +00:00
Ryan Tseng
f96b6a7bc9 DEPS: Invoke play services hook with vpython
Otherwise it will inherit the empty python venv.

Bug: 869249
TBR: fbarchard
Change-Id: Ib77d116863f44f482b2cd7cbfaf71966ce2b7629
Reviewed-on: https://chromium-review.googlesource.com/1157535
Reviewed-by: Ryan Tseng <hinoka@chromium.org>
Commit-Queue: Ryan Tseng <hinoka@chromium.org>
2018-07-31 23:55:53 +00:00
Ryan Tseng
63d5de79cd [vpython]: Add pypiwin32
Catapult uses this for win32con

Bug: 869249
Change-Id: I6775ff7834100d2b4a55eee3330369fc15b2f14f
Reviewed-on: https://chromium-review.googlesource.com/1157139
Reviewed-by: Frank Barchard <fbarchard@chromium.org>
Commit-Queue: Ryan Tseng <hinoka@chromium.org>
2018-07-31 19:31:36 +00:00
lixia zhang
21be9122aa libyuv:loongson optimize compare/row/scale/rotate files with mmi.
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>
2018-07-20 22:53:04 +00:00
Frank Barchard
55f5d91f11 Disable old int types by default.
Legacy types can cause build errors with code that defines
them differently.  Disable them by default.  Allow the types
to be enabled with #define LIBYUV_LEGACY_TYPES

BUG=libyuv:808
TESTED=libyuv try bots still build

Change-Id: I48928329393f44a377cec781e645570b14569668
Reviewed-on: https://chromium-review.googlesource.com/1129558
Commit-Queue: Frank Barchard <fbarchard@chromium.org>
Reviewed-by: Frank Barchard <fbarchard@chromium.org>
2018-07-09 21:16:47 +00:00
Frank Barchard
9ac881f4aa msa use void * for loads
the built in __msa_ld_b() expects a void * without const.
Cast pointers to void * to avoid build warning.

TBR=johannkoenig@google.com
Bug: libyuv:805
Change-Id: Iabc4820ecf4a3a7dcb0063e67ce276ae2a4f0501
Tested: 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"
ninja -v -C out/Release libyuv_unittest
Reviewed-on: https://chromium-review.googlesource.com/1125400
Commit-Queue: Frank Barchard <fbarchard@chromium.org>
Reviewed-by: Frank Barchard <fbarchard@chromium.org>
2018-07-04 00:24:19 +00:00
Johann
8b458d5bd9 xcode: disable avx512 support
xcode reports clang version 9. It does not appear to support inline
assembly using avx512 instructions.

Tested with cmake libyuv on Mac. Fails without this patch.

BUG=libyuv:789
2018-06-29 06:50:29 -07:00
Frank Barchard
4d67b3e851 Add H420 and H422 to ConvertToARGB()
H420/H422 are bt.720 variants

TBR=braveyao@chromium.org
BUG=libyuv:799
TESTED=try bots tested build on all platforms

Change-Id: I007d8981d91ca0748c59403759109bbcd88f286c
Reviewed-on: https://chromium-review.googlesource.com/1115719
Commit-Queue: Frank Barchard <fbarchard@chromium.org>
Reviewed-by: Frank Barchard <fbarchard@chromium.org>
2018-06-26 22:52:42 +00:00
Johann
a37e7bfece use unix line endings
Consistently use one style of line endings for the repository

Change-Id: Idd70e3d7f3a7a6641b268a81e51eebf9c705b67d
Reviewed-on: https://chromium-review.googlesource.com/1107877
Reviewed-by: Frank Barchard <fbarchard@chromium.org>
Commit-Queue: Frank Barchard <fbarchard@chromium.org>
2018-06-20 23:19:59 +00:00
Johann
bf25313b83 add const to msa loads
Avoid warnings regarding loss of qualifiers:
warning: cast from type ‘const uint8_t* {aka const unsigned char*}’
to type ‘v16i8* {aka __vector(16) signed char*}’ casts away
qualifiers

BUG=libyuv:793

Change-Id: Ie0d215bc07b49285b5d06ee91ccc2c9a7979799e
Reviewed-on: https://chromium-review.googlesource.com/1107879
Reviewed-by: Frank Barchard <fbarchard@chromium.org>
Commit-Queue: Frank Barchard <fbarchard@chromium.org>
2018-06-20 22:56:09 +00:00
Tom Anderson
bc383e76d6 Update DEPS necessary to green-up CQ bots
BUG=libyuv:795

Change-Id: Ic1eb6eb841e763c0d58e6fb36322addb3956d8f2
Reviewed-on: https://chromium-review.googlesource.com/1103311
Reviewed-by: Frank Barchard <fbarchard@chromium.org>
Commit-Queue: Frank Barchard <fbarchard@chromium.org>
2018-06-16 01:11:31 +00:00
Tom Anderson
780cdfed4e Remove manual references to exe_and_shlib_deps
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>
2018-06-15 22:07:38 +00:00
Frank Barchard
083aa718b9 Add AR30 and AB30 to ConvertToARGB() and fix negative NV12 height
BUG=libyuv:799
TESTED=try bots build

Change-Id: Ib4ce8d928069445a710c1e30ea85d9dccc820b6c
Reviewed-on: https://chromium-review.googlesource.com/1097561
Reviewed-by: Miguel Casas <mcasas@chromium.org>
Commit-Queue: Frank Barchard <fbarchard@chromium.org>
2018-06-12 19:04:40 +00:00
Frank Barchard
196e2e72a3 Revert "Allow negative height when ConvertToI420/ARGB is called with NV12/NV21"
This reverts commit a8aa921c4614f9d6a0e8f3459648ca1ae75cdbe6.

Reason for revert: breaks a webrtc unittest on Windows.

https://bugs.chromium.org/p/webrtc/issues/detail?id=9263&can=2&start=0&num=100&q=&colspec=ID%20Pri%20M%20ReleaseBlock%20Component%20Status%20Owner%20Summary&groupby=&sort=

Original change's description:
> Allow negative height when ConvertToI420/ARGB is called with NV12/NV21
> 
> ConvertToI420 and ConvertToARGB support the use of a negative height
> parameter to flip the image vertically. When converting from NV12 or
> NV21 this parameter was misinterpreted, resulting in invalid output.
> This CL introduces the use of abs_src_height to correctly calculate
> the location of the source UV plane.
> 
> The sign of crop_height is not used, to reduce confusion ConvertToI420
> and ConvertToARGB no longer accept negative crop height.
> 
> Unit tests for Android420ToI420 are updated to fix miscalculation of
> src_stride_uv, fix incorrect pixel strides, and to test inversion.
> New unit tests are included to test inversion for ConvertToARGB,
> ConvertToI420, Android420ToARGB, and Android420ToABGR.
> For consistency the test NV12Crop is renamed ConvertToI420_NV12_Crop.
> 
> Bug: libyuv:446
> Test: out/Release/libyuv_unittest --gtest_filter=*.ConvertTo*:*.Android420To*
> Change-Id: Idc98e62671cb30272cfa7e24fafbc8b73712f7c6
> Reviewed-on: https://chromium-review.googlesource.com/994074
> Commit-Queue: Frank Barchard <fbarchard@chromium.org>
> Reviewed-by: Frank Barchard <fbarchard@chromium.org>

TBR=fbarchard@chromium.org,robert@bares.me

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

Bug: libyuv:446, chromium:9263, libyuv:801
Change-Id: I7c55b3fcb477f9754c249b9c2c54b24da2c29283
Reviewed-on: https://chromium-review.googlesource.com/1081267
Reviewed-by: Frank Barchard <fbarchard@chromium.org>
Reviewed-by: Weiyong Yao <braveyao@chromium.org>
Commit-Queue: Frank Barchard <fbarchard@chromium.org>
2018-06-01 00:19:40 +00:00
Frank Barchard
a7fb978e30 ARGBExtractAlphaRow_Any_AVX2 fix pixel count mask
Mask was set to 32, but should have been 31.
BUG=libyuv:798
TESTED=try bots tested

Change-Id: I6120928873a4a2f1efef907d8e8296ca8c20bb03
Reviewed-on: https://chromium-review.googlesource.com/1054830
Reviewed-by: Frank Barchard <fbarchard@chromium.org>
2018-05-11 07:13:58 +00:00
Robert Bares
a8aa921c46 Allow negative height when ConvertToI420/ARGB is called with NV12/NV21
ConvertToI420 and ConvertToARGB support the use of a negative height
parameter to flip the image vertically. When converting from NV12 or
NV21 this parameter was misinterpreted, resulting in invalid output.
This CL introduces the use of abs_src_height to correctly calculate
the location of the source UV plane.

The sign of crop_height is not used, to reduce confusion ConvertToI420
and ConvertToARGB no longer accept negative crop height.

Unit tests for Android420ToI420 are updated to fix miscalculation of
src_stride_uv, fix incorrect pixel strides, and to test inversion.
New unit tests are included to test inversion for ConvertToARGB,
ConvertToI420, Android420ToARGB, and Android420ToABGR.
For consistency the test NV12Crop is renamed ConvertToI420_NV12_Crop.

Bug: libyuv:446
Test: out/Release/libyuv_unittest --gtest_filter=*.ConvertTo*:*.Android420To*
Change-Id: Idc98e62671cb30272cfa7e24fafbc8b73712f7c6
Reviewed-on: https://chromium-review.googlesource.com/994074
Commit-Queue: Frank Barchard <fbarchard@chromium.org>
Reviewed-by: Frank Barchard <fbarchard@chromium.org>
2018-04-19 02:41:27 +00:00
Patrik Höglund
5669005fc0 Skip cipd dependencies when autorolling.
This is a stop-gap; it will simply cause cipd deps to not be updated,
which will probably keep things working for now, but it's not what we
want for the long term.

Bug: chromium:659808
Change-Id: I292b96f174c8d910c0b5f0196eefd0e5a5f907c2
Reviewed-on: https://chromium-review.googlesource.com/1016380
Reviewed-by: Frank Barchard <fbarchard@chromium.org>
Commit-Queue: Frank Barchard <fbarchard@chromium.org>
2018-04-18 18:37:26 +00:00
Johann
b8696fde84 add const to casts
When casting a const value, ensure the cast is const as well.

BUG=webm:1509

Change-Id: I5b597fdcc148d111e9824bc7cf918fc5f24e970f
Reviewed-on: https://chromium-review.googlesource.com/996553
Reviewed-by: Frank Barchard <fbarchard@chromium.org>
Commit-Queue: Frank Barchard <fbarchard@chromium.org>
2018-04-13 22:52:52 +00:00
Frank Barchard
7e5e12757b use attribute to alias for punning float to int
Bug: libyuv:791
Test: g++ -Iinclude -I../libvpx/third_party/libwebm -I../libvpx/vp8 -I../libvpx/vp8 -I../libvpx/vp9 -I../libvpx/vp9 -Iinclude -m64 -DNDEBUG -O3 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=0 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -Wall -Wdisabled-optimization -Wfloat-conversion -Wpointer-arith -Wtype-limits -Wcast-qual -Wvla -Wuninitialized -Wunused -Wextra -I. -I"../libvpx" -D__STDC_CONSTANT_MACROS -D__STDC_LIMIT_MACROS -Wno-unused-parameter -c -o third_party/libyuv/source/row_common.cc.o source/row_common.cc
Change-Id: Ia006cb9212b671ae668cab5ec0b29759024a2c8a
Reviewed-on: https://chromium-review.googlesource.com/1012462
Reviewed-by: Johann Koenig <johannkoenig@google.com>
Commit-Queue: Frank Barchard <fbarchard@chromium.org>
2018-04-13 19:20:52 +00:00
Johann
2edf6745e0 update linux makefile with mips/msa files
BUG=webm:1509

Change-Id: I74db6e287952b343021c0a17a80c973517080517
Reviewed-on: https://chromium-review.googlesource.com/996311
Reviewed-by: Frank Barchard <fbarchard@chromium.org>
Commit-Queue: Frank Barchard <fbarchard@chromium.org>
2018-04-13 18:58:52 +00:00
Johann
190fb79ced row_common.cc: add const to cast
When casting input for loads, include modifiers such as 'const'

Clears build warnings:

warning: cast from type 'const uint8_t* {aka const unsigned char*}' to
type 'uint32_t* {aka unsigned int*}' casts away qualifiers [-Wcast-qual]

Bug: webm:1509, libyuv:791
Test: g++ -Iinclude -I../libvpx/third_party/libwebm -I../libvpx/vp8 -I../libvpx/vp8 -I../libvpx/vp9 -I../libvpx/vp9 -Iinclude -m64 -DNDEBUG -O3 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=0 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -Wall -Wdisabled-optimization -Wfloat-conversion -Wpointer-arith -Wtype-limits -Wcast-qual -Wvla -Wuninitialized -Wunused -Wextra -I. -I"../libvpx" -D__STDC_CONSTANT_MACROS -D__STDC_LIMIT_MACROS -Wno-unused-parameter -c -o third_party/libyuv/source/row_common.cc.o source/row_common.cc




Change-Id: I1e3b2fe2a4ae9dd466c3db9cde0560aceb9d1398
Reviewed-on: https://chromium-review.googlesource.com/996393
Reviewed-by: Frank Barchard <fbarchard@chromium.org>
Commit-Queue: Frank Barchard <fbarchard@chromium.org>
2018-04-13 18:18:07 +00:00
Martin Storsjö
6e498475c7 Really fix building with clang targeting x86_32 mingw, remove duplication
This is the same fix as in d4cfc7bca1e6d66431b98b78dc2e29d9ec1bf904,
but applied at the second block that also defines HAS_HASHDJB2_AVX2.

Remove the duplicated, redundant block.

Change-Id: I53e0fc5f46e2ed5c14a4531c2b571c72d969a471
Reviewed-on: https://chromium-review.googlesource.com/989432
Reviewed-by: Frank Barchard <fbarchard@chromium.org>
Commit-Queue: Frank Barchard <fbarchard@chromium.org>
2018-04-13 01:51:06 +00:00
Johann
ebbe88ac0d remove LICENSE_THIRD_PARTY
The file this referes to (x86inc.asm) was removed in commit
c9986313acbd74ebc2609f0a42492d0e2f1e78c6

BUG=libyuv:790

Change-Id: I4aae28475ef11e01304daf2aaf60a0404752cfa7
Reviewed-on: https://chromium-review.googlesource.com/996373
Reviewed-by: Frank Barchard <fbarchard@chromium.org>
Commit-Queue: Frank Barchard <fbarchard@chromium.org>
2018-04-12 21:59:39 +00:00
Oleh Prypin
8b8f872dd7 Migrate autoroller from roll-dep-svn to gclient setdep
Bug: webrtc:9104
No-Try: True
Change-Id: I3860b0f7b07fa5110a0bc552965c49801c7a3acd
Reviewed-on: https://chromium-review.googlesource.com/1005002
Commit-Queue: Oleh Prypin <oprypin@chromium.org>
Reviewed-by: Patrik Höglund <phoglund@chromium.org>
2018-04-11 09:18:17 +00:00
Frank Barchard
a9626b9daf Disable AVX512 for iOS simulator xcode 9 builds.
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>
2018-04-03 18:45:14 +00:00
Martin Storsjö
a694e339d1 Make the gflags library optional in the CMake build
When detected, add the necessary defines to actually use it.

Change-Id: I540c3e11e480be8aaab154ad91ee08cdc52319de
Reviewed-on: https://chromium-review.googlesource.com/988432
Commit-Queue: Frank Barchard <fbarchard@chromium.org>
Reviewed-by: Frank Barchard <fbarchard@chromium.org>
2018-03-31 00:40:15 +00:00
Martin Storsjö
d4cfc7bca1 Fix building with clang targeting x86_32 mingw
In these cases, CLANG_HAS_AVX2 is defined, but _MSC_VER isn't.

The corresponding codepaths are in source/compare_win.cc, and the whole
file is guarded with a defined(_MSC_VER).

This is the same fix as in d8680893ecfcffd952c7a5d0dc1878d1c486a4e4,
but this issue wasn't noticed since compare.o wasn't linked in in
earlier tested configurations.

Change-Id: Ifff6d4bd7b1071256df1169881490a52026c183b
Reviewed-on: https://chromium-review.googlesource.com/988573
Reviewed-by: Frank Barchard <fbarchard@chromium.org>
Commit-Queue: Frank Barchard <fbarchard@chromium.org>
2018-03-30 22:37:46 +00:00
Martin Storsjö
efb70e57de Fix building the library with cmake for windows
Change-Id: Ib6367fa94c60f7239fe02ace81c06054b1b4a837
Reviewed-on: https://chromium-review.googlesource.com/988532
Reviewed-by: Frank Barchard <fbarchard@chromium.org>
Commit-Queue: Frank Barchard <fbarchard@chromium.org>
2018-03-30 22:13:55 +00:00
Frank Barchard
816b7b1279 Add __attribute__ ((__target__ ("avx512vbmi")))
Bug: libyuv:789
Test: builds locally on linux with clang
Change-Id: I3000494d4b0b18f59d7852bc1bc0c9e422d2d63a
Reviewed-on: https://chromium-review.googlesource.com/987331
Reviewed-by: richard winterton <rrwinterton@gmail.com>
2018-03-30 17:17:35 +00:00
Frank Barchard
4ad33344cf Pass float parameters via vector 2 float and "w" for scalar multiply.
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>
2018-03-28 21:52:08 +00:00
Martin Storsjö
d8680893ec Fix building with clang targeting x86_32 mingw
In these cases, CLANG_HAS_AVX2 is defined, but _MSC_VER isn't.

The corresponding codepaths are in source/row_win.cc, and the whole
file is guarded with an defined(_MSC_VER).

Change-Id: Idf0cfced3a0ef28c07b1393fe605a904420fd50f
Reviewed-on: https://chromium-review.googlesource.com/983592
Reviewed-by: Frank Barchard <fbarchard@chromium.org>
Commit-Queue: Frank Barchard <fbarchard@chromium.org>
2018-03-28 18:31:39 +00:00
Frank Barchard
548ec65656 Require clang 6 for AVX512 support
row.h adds CLANG_HAS_AVX512
function ifdefs in row.h for avx512
source code ifdefed function by function for
avx512 and avx2.

Bug: libyuv:778
Test: LibYUVConvertTest.NV21ToRGB24_Opt
Change-Id: If32b51459685d0d5785c5c1e94c8f668f8e74b55
Reviewed-on: https://chromium-review.googlesource.com/982402
Commit-Queue: Frank Barchard <fbarchard@chromium.org>
Reviewed-by: richard winterton <rrwinterton@gmail.com>
2018-03-28 02:38:39 +00:00
Frank Barchard
c21af29ab7 jpeg remove empty function declarations
undo clang-tidy change that introduced empty functions.

Bug: libyuv:788
Test: try bots build
Change-Id: I093aa72c421bace654394726026bc531a761d51d
Reviewed-on: https://chromium-review.googlesource.com/982410
Reviewed-by: Weiyong Yao <braveyao@chromium.org>
Commit-Queue: Frank Barchard <fbarchard@chromium.org>
2018-03-28 00:38:20 +00:00
Jay Civelli
fdad6299d6 Add a method to force the CPU flags
Adds a method that forces the CPU flags. Useful when using libyuv inside
a sandboxed process which may not have access to the file system.

Bug: libyuv:787
Change-Id: I01f71e39a7301085d9de388eba930b4cac0fd7be
Reviewed-on: https://chromium-review.googlesource.com/972338
Commit-Queue: Frank Barchard <fbarchard@chromium.org>
Reviewed-by: Frank Barchard <fbarchard@chromium.org>
2018-03-26 19:31:00 +00:00
Patrik Höglund
6ecd76ae8d Make libyuv use the hermetic xcode toolchain.
This is what Chromium is moving to, and what WebRTC is using.
Next step: pull xcode via CIPD.

Bug:chromium:633032
Change-Id: I6a21aa0e5b212a3a9cb4e7cc79ebb614a89f73ed
Reviewed-on: https://chromium-review.googlesource.com/915921
Commit-Queue: Patrik Höglund <phoglund@chromium.org>
Reviewed-by: Frank Barchard <fbarchard@chromium.org>
2018-03-20 08:28:33 +00:00
Frank Barchard
9d70f13c8f cpuid sandbox friendlier avoiding getenv()
Move getenv to unittest.cc to allow libyuv to be
run in sandbox for x86, x64 and aarch64

Bug: libyuv:767
Test: unittests still run and respect environment variables
Change-Id: I84cb1717977828776142b51c029774b3e6b142a3
Reviewed-on: https://chromium-review.googlesource.com/969645
Reviewed-by: richard winterton <rrwinterton@gmail.com>
2018-03-20 01:04:30 +00:00