1656 Commits

Author SHA1 Message Date
Frank Barchard
fbdc43a03c fix wrong HAS_ARGBCOPYALPHAROW_SSE2 ifdef
TBR=kjellander@chromium.org
BUG=libyuv:593
TESTED=try bots pass.

Review URL: https://codereview.chromium.org/2000393002 .
2016-05-23 16:26:02 -07:00
Niels Möller
caa89bf974 Prune the list of third_party symlinks
BUG=webrtc:5006
R=kjellander@chromium.org, magjed@chromium.org

Review URL: https://codereview.chromium.org/1981883002 .
2016-05-17 12:53:03 +02:00
Frank Barchard
07cb92272f If image sizes are greater than 32768, fixed point stepping will overflow an int. This CL changes the max size to 32768 and disables the test if larger.
BUG=libyuv:590
TESTED=LIBYUV_FLAGS=-1 LIBYUV_WIDTH=8192 LIBYUV_HEIGHT=16 out/Release/libyuv_unittest --gtest_filter=*
R=harryjin@google.com

Review URL: https://codereview.chromium.org/1947783002 .
2016-05-05 19:09:02 -07:00
Frank Barchard
6924590212 Add all library source files to linux.mk
Allows arm and mips linux builds.
Add psnr and cpuid utility targets.

BUG=libyuv:586
TESTED=make -f linux.mk
TBR=kjellander@chromium.org

Review URL: https://codereview.chromium.org/1906653003 .
2016-04-20 16:48:53 -07:00
Frank Barchard
cf101116c9 Remove initialize to zero on output variables for inline.
Inline that uses temporary variables is currently initializing them
to 0 and passing in as output "+r".
This CL replaces the output constraint to "=&r" for most meaning an
output with early write (before inputs).  This allows the initialize
to zero step to be removed, saving 1 instruction.

BUG=libyuv:580
TESTED=local libyuv build on gcc/linux and try bots
R=harryjin@google.com

Review URL: https://codereview.chromium.org/1895743008 .
2016-04-18 16:24:26 -07:00
Frank Barchard
f160ce90bb Roll chromium_revision 8cdf0347.. 1d144ca7
roll chromium_revision for libyuv to pick up jpeg gyp change for NaCL.

new jpeg allows nacl generate without Duse_system_yasm=0

BUG=libyuv:581
TESTED=local nacl build.
R=kjellander@chromium.org

Review URL: https://codereview.chromium.org/1882303002 .
2016-04-13 15:26:36 -07:00
Henrik Kjellander
361d8b8156 Enable building with Native Client.
This requires you don't have target_os=["ios"] set in your
libyuv root .gclient file, since that will make native_client not
being downloaded due to
https://code.google.com/p/chromium/codesearch#chromium/src/DEPS&l=357

BUG=libyuv:573
TESTED=
rm chromium/.last_sync_chromium
rm chromium/.gclient.tmp_entries
gclient sync
native_client/build/gyp_nacl all.gyp -Dgtest_target_type=executable -Dmsan=0 -Duse_system_yasm=0
ninja -C out/Debug

Review URL: https://codereview.chromium.org/1845003004 .
2016-04-12 06:40:04 +02:00
Frank Barchard
9c53ff2c57 Fix temporary stride for ConvertToARGB with rotation.
BUG=libyuv:578
TESTED=local unittests pass
R=harryjin@google.com

Review URL: https://codereview.chromium.org/1879783002 .
2016-04-11 15:21:04 -07:00
Henrik Kjellander
9cb0705771 PRESUBMIT: Add GN bots to default trybots
BUG=601140
TBR=fbarchard@chromium.org

Review URL: https://codereview.chromium.org/1878763002 .
2016-04-11 22:07:55 +02:00
Frank Barchard
2c77dbb976 disable unused argument warning for clang builds.
normally this warning is disabled but for nacl builds that
use clang its not.  this CL makes the option universally disabled
for all clang based builds.

BUG=libyuv:581
TESTED=native_client/build/gyp_nacl all.gyp -Dgtest_target_type=executable -Dmsan=0 & ninja -C out/Debug libyuv
R=kjellander@chromium.org

Review URL: https://codereview.chromium.org/1865183002 .
2016-04-11 11:43:08 -07:00
Frank Barchard
3c862e3d29 Fix stride bug for msan on I420Interpolate.
When using C version of I420Interpolate for msan, a 50% interpolation
would cause stride to be cast to int, which could cause erroneous
memory reads on 64 bit build.
This CL makes the stride use ptrdiff_t for HalfRow_C

BUG=libyuv:582
TESTED=try bots tests
R=dhrosa@google.com

Review URL: https://codereview.chromium.org/1872953002 .
2016-04-08 15:58:53 -07:00
Henrik Kjellander
870d9b513b Skip running GYP if GYP_CHROMIUM_NO_ACTION is set in environment
This is how GYP is skipped on the GN bots. If GYP runs, it will currently
produce files in out/{Debug,Releaese} that makes GN fail.

BUG=601140
TBR=fbarchard@chromium.org

Review URL: https://codereview.chromium.org/1874653003 .
2016-04-08 14:01:29 +02:00
Frank Barchard
8c8294f09b Empty overrides file for GN on Mac
R=kjellander@chromium.org

BUG=libyuv:583
TESTED=gn gen out/Debug

Review URL: https://codereview.chromium.org/1870473002 .
2016-04-07 14:39:30 -07:00
Frank Barchard
ddbc63f7b9 Add //build/config/BUILD.gn to exec whitelist for GN.
Affected Linux GN build, not Windows.

R=kjellander@chromium.org
BUG=libyuv:583
TESTED=gn gen out/Debug --args=is_debug=true

Review URL: https://codereview.chromium.org/1866743002 .
2016-04-06 11:23:28 -07:00
Frank Barchard
c7372a323a add if defined(_MSC_FULL_VER) for NaCL
TBR=kjellander@chromium.org
BUG=libyuv:573
TESTED=try bots

Review URL: https://codereview.chromium.org/1850053002 .
2016-04-01 17:48:23 -07:00
Frank Barchard
ef79a9938b cmake move libyuv_unittest target into the if(TEST) condition
BUG=libyuv:579
TESTED=mkdir build && cd build && cmake .. && cmake --build . --config Release
R=kjellander@chromium.org

Review URL: https://codereview.chromium.org/1847233002 .
2016-04-01 16:15:34 -07:00
Magnus Jedvert
5065743a11 Remove reference builds from gclient
R=aiolos@chromium.org, torbjorng@chromium.org

Review URL: https://codereview.chromium.org/1809653002 .
2016-03-31 13:18:33 +02:00
Frank Barchard
837aa1e2af disable assembly in header for msan=1
GYP_DEFINES="target_arch=x64 msan=1" ./gyp_libyuv
ninja -j7 -C out/Release

R=impjdi@google.com
BUG=libyuv:575

Review URL: https://codereview.chromium.org/1805683003 .
2016-03-15 18:45:38 -07:00
Henrik Kjellander
e336f9941c Docs: Fix broken links from README.md
Thanks to Alexander Kolesnik (alexkol75@gmail.com) for noticing this.

BUG=
R=fbarchard@google.com

Review URL: https://codereview.chromium.org/1805523002 .
2016-03-15 17:38:14 -07:00
Frank Barchard
76aee8ced7 Remove most clang-cl special cases from cpu_id.cc
They are not needed, and due to them there was a call to _xgetbv()
without a declaration of the function.  This used to work because we
implicitly included intrin.h in all translation units with clang-cl, but
we want to stop doing that.

BUG=chromium:592745
R=fbarchard@google.com

Review URL: https://codereview.chromium.org/1780473003 .
2016-03-10 14:01:26 -08:00
Henrik Kjellander
46c3d42ca5 Roll chromium_revision 3c45587..8cdf034 + rename libvpx_new
This brings in the renamed libvpx that happened in
https://codereview.chromium.org/1734613003/

TBR=fbarchard@chromium.org

Review URL: https://codereview.chromium.org/1764083002 .
2016-03-04 23:59:35 +01:00
Frank Barchard
ee99b85126 Port ARGBToRGB565 from aarch64 neon to 32 bit
The 64 bit version of ARGBToRGB565 to 32 bit. 64 bit is using sri which shifts and inserts, saving some masking.  The instruction is available for neon 32 bit as well.

R=magjed@chromium.org, harryjin@google.com
BUG=libyuv:571

Review URL: https://codereview.chromium.org/1724393002 .
2016-02-29 12:22:25 -08:00
Frank Barchard
ab0dfdd4ff Documentation fix for android aarch64 disassembly.
Name of objdump tool updated.

TBR=kjellander@chromium.org
BUG=none

Review URL: https://codereview.chromium.org/1715743003 .

Review URL: https://codereview.chromium.org/1727993002 .
2016-02-23 18:30:35 -08:00
Frank Barchard
38d37a5bee Documentation fix for android aarch64 disassembly
Name of objdump tool updated.

R=kjellander@chromium.org
BUG=none

Review URL: https://codereview.chromium.org/1715743003 .
2016-02-19 11:30:22 -08:00
Frank Barchard
810c1791cc symlinks for android launcher
Based on webrtc roll https://codereview.webrtc.org/1503883002

0c2a94ab87
needed the addition of tools/telemetry and third_party/catapult symlinks
for Android.
GN changes required modification of .gn.

Change log: 626eecf..72c3265
Full diff: 626eecf..72c3265

Changed dependencies:
* src/buildtools: 818123d..b747a9e
* src/third_party/boringssl/src: https://boringssl.googlesource.com/boringssl.git/+log/fde89b4..6d9e5a7
DEPS diff: 626eecf..72c3265/DEPS
TBR=jkellander@chromium.org
BUG=libyuv:570

Review URL: https://codereview.chromium.org/1709193002 .
2016-02-18 15:30:23 -08:00
Frank Barchard
22e062a448 Port ARGBToJ420 to AVX2
ARGBToJ420 had an SSSE3 version, but not AVX2.
ARGBToI420 had an AVX2, so adapt that code to J420.

TBR=harryjin@google.com
BUG=libyuv:553

Review URL: https://codereview.chromium.org/1702373004 .
2016-02-17 23:16:39 -08:00
Frank Barchard
127ff512b3 add perf data files to ignores
document play services update

R=jkellander@chromium.org
BUG=none

Review URL: https://codereview.chromium.org/1712463002 .
2016-02-17 21:37:09 -08:00
Frank Barchard
69c38c5cf5 update linux instructions to not update clang
R=jkellander@chromium.org
BUG=none

Review URL: https://codereview.chromium.org/1703243003 .
2016-02-17 21:16:28 -08:00
Frank Barchard
c5745d558a Documentation change - Remove MIPS from LIBYUV_DISABLE_DSPR2
Make environment variables match ifdefs with one SIMD instruction set word
as suffix for functions, ifdefs and environment variables.

R=kjellander@chromium.org
BUG=libyuv:486

Review URL: https://codereview.chromium.org/1704053002 .
2016-02-17 11:07:27 -08:00
Henrik Kjellander
584c2e660d Add all wiki pages as MarkDown documents + README.md
This is based on today's content at
https://code.google.com/p/libyuv/w/list

BUG=chromium:587193

Review URL: https://codereview.chromium.org/1703653002 .
2016-02-17 07:50:19 +01:00
Henrik Kjellander
f9496cfdf3 Add new OWNERS and remove drover.properties.
The drover.properties file is no longer useful after
migrating the repo to Git.

BUG=libyuv:568
R=mflodman@chromium.org

Review URL: https://codereview.chromium.org/1696173002 .
2016-02-16 19:53:11 +01:00
Frank Barchard
20343f45c6 Update CMake build to support gflags and gtest correctly
The gflags library was missing from the CMake build
and the gtest includes were not being set correctly.

R=fbarchard@google.com

Review URL: https://codereview.chromium.org/1692083002 .
2016-02-12 15:42:56 -08:00
Frank Barchard
cc33dc68c7 Port I411ToARGBRow to AVX2.
An SSSE3 version already exists, and an AVX2 version is available for
Visual C.  This ports the function to AVX2 completing the AVX2 ports of
all YUV to RGB functions for AVX2 on gcc.

TBR=harryjin@google.com
BUG=libyuv:555

Review URL: https://codereview.chromium.org/1687253002 .
2016-02-12 10:26:10 -08:00
Frank Barchard
0e554b18fe port NV12ToRGB565Row_AVX2 to gcc
NV12ToRGB565Row for Intel is implemented as a 2 step conversion:
NV12ToARGBRow_SSSE3 and ARGBToRGB565Row_SSE2

NV12ToARGBRow has an AVX2 version, so this CL implements
NV12ToRGB565Row_AVX2 with call to NV12ToARGBRow_AVX2 and
ARGBToRGB565Row_SSE2.

R=harryjin@google.com
BUG=libyuv:554

Review URL: https://codereview.chromium.org/1687953002 .
2016-02-10 11:13:41 -08:00
Frank Barchard
c39509c8e5 add avx2 wrappers for functions that can call I422ToARGBRow_AVX2
R=harryjin@google.com
BUG=libyuv:557

Review URL: https://codereview.chromium.org/1687713002 .
2016-02-09 17:14:29 -08:00
Henrik Kjellander
df8b930b78 Add linux_msan to default trybots
TBR=fbarchard@chromium.org

Review URL: https://codereview.chromium.org/1679123006 .
2016-02-09 21:36:11 +01:00
Frank Barchard
6ea3755330 add 'LIBYUV_DISABLE_X86' to msan for unittests
R=harryjin@google.com
BUG=libyuv:564

Review URL: https://codereview.chromium.org/1685723002 .
2016-02-09 11:57:03 -08:00
Frank Barchard
fc2adcfa42 fix for msan builds which set -DLIBYUV_DISABLE_X86=1
TBR=harryjin@google.com
BUG=libyuv:566

Review URL: https://codereview.chromium.org/1673313003 .
2016-02-09 10:51:20 -08:00
Frank Barchard
1f83973698 bump chromium deps to match webrtc deps
R=harryjin@google.com
BUG=none

Review URL: https://codereview.chromium.org/1676383002 .
2016-02-08 15:28:14 -08:00
Frank Barchard
0d880e5bc0 rename MIPS_DSPR2 to DSPR2 for consistency
When attempting to normalize function names to end in Row_SIMD it was made
harder with MIPS_DSPR2 naming convention.
Other CPUs do not include the vendor.  This should be named consistently.

Removed the DISABLE_MIPS in favour of DISABLE_ASM for consistency with other
processors.

TBR=harryjin@google.com
BUG=libyuv:562

Review URL: https://codereview.chromium.org/1677633002 .
2016-02-05 14:49:54 -08:00
Henrik Kjellander
af90e82155 Add empty MSan blacklist.txt to make MSan builds pass.
TBR=fbarchard@chromium.org
BUG=libyuv:564

Review URL: https://codereview.chromium.org/1665573003 .
2016-02-03 11:52:19 +01:00
Henrik Kjellander
b0426365c9 Add UBSan trybots to the default set.
TBR=fbarchard@chromium.org

Review URL: https://codereview.chromium.org/1656423002 .
2016-02-03 08:09:17 +01:00
Frank Barchard
903c91cc2e fix for ubsan on unittest.h fastrand()
internal math of the fastrand function uses a multiply
and add that overflows a signed int.  This triggers a
ubsan failure:

../../unit_test/../unit_test/unit_test.h:60:33: runtime error: signed integer overflow: 56248274 * 214013 cannot be represented in type 'int'

This change casts the intermediate math to unsigned
int to avoid the overflow.

For more info on ubsan, see
http://dev.chromium.org/developers/testing/undefinedbehaviorsanitizer

TESTED=Passing compilation using:
GYP_DEFINES="ubsan=1"
GYP_DEFINES="ubsan_vptr=1"

R=harryjin@google.com, pbos@webrtc.org
BUG=libyuv:563

Review URL: https://codereview.chromium.org/1662453003 .
2016-02-02 14:32:12 -08:00
Frank Barchard
05ed0c539c rework scale code for ubsan
For more info on ubsan, see
http://dev.chromium.org/developers/testing/undefinedbehaviorsanitizer

TESTED=Passing compilation using:
GYP_DEFINES="ubsan=1"
GYP_DEFINES="ubsan_vptr=1"

R=harryjin@google.com, pbos@webrtc.org
BUG=libyuv:563

Review URL: https://codereview.chromium.org/1654253004 .
2016-02-02 11:01:49 -08:00
Frank Barchard
0e7d2926e2 UBSan: Add blacklist files for libyuvC standalone.
For more info, see
http://dev.chromium.org/developers/testing/undefinedbehaviorsanitizer

TESTED=Passing compilation using:
GYP_DEFINES="ubsan=1"
GYP_DEFINES="ubsan_vptr=1"

R=harryjin@google.com, pbos@webrtc.org
BUG=libyuv:563,webrtc:5124

Review URL: https://codereview.chromium.org/1659713002 .
2016-02-01 18:08:52 -08:00
Frank Barchard
9e39c1f271 ubsan overflow fix for multiply by 0x01010101
This is an UBSan error reported by libjingle

[ RUN      ] WebRtcVideoFrameTest.ConvertToYUY2BufferStride
[000:000] (videoframe.cc:375): Validate frame passed. format: I420 bpp: 12 size: 1280x720 bytes: 1382400 expected: 1382400 sample[0..3]: 73, 73, 73, 73
../../chromium/src/third_party/libyuv/source/row_gcc.cc:2903:25: runtime error: signed integer overflow: 128 * 16843009 cannot be represented in type 'int'
[8/614] WebRtcVideoFrameTest.ConvertToYUY2BufferStride returned/aborted with exit code 1 (32 ms)
[9/614] WebRtcVideoFrameTest.ConvertToYUY2BufferInverted (29 ms)
Note: Google Test filter = WebRtcVideoFrameTest.ConvertToYUY2BufferInverted

The source is uint8 and the multiply is by 0x01010101 to replicate the byte to 4 bytes.
Changing the constant to 0x01010101u should avoid overflow.

R=harryjin@google.com
TBR=harryjin@google.com
BUG=libyuv:563

Review URL: https://codereview.chromium.org/1657533005 .
2016-02-01 12:29:04 -08:00
Frank Barchard
1cc0177669 Remove duplicate prototype for MJPGToARGB
MJPGToARGB prototype is in both convert_argb.h and planar_functions.h
Remove the duplicate prototype from planar_functions.h

R=harryjin@google.com
TBR=harryjin@google.com
BUG=libyuv:561

Review URL: https://codereview.chromium.org/1638133002 .
2016-01-26 17:02:45 -08:00
Frank Barchard
ad71738f6a Remove svn version build and unittest.
R=harryjin@google.com
TBR=harryjin@google.com, kjellander@google.com
BUG=libyuv:551

Review URL: https://codereview.chromium.org/1612123002 .
2016-01-21 11:22:11 -08:00
Henrik Kjellander
a4288dd6dc Disable sometimes-uninitialized Clang warning for iOS
This works around a compile problem with iossim.mm.

BUG=libyuv:548
TBR=fbarchard@chromium.org

Review URL: https://codereview.chromium.org/1611123004 .
2016-01-21 13:07:35 +01:00
Henrik Kjellander
484692b6cc Remove mac_x64_rel from trybot defaults.
As this bot was removed in https://codereview.chromium.org/1613013003/

TBR=fbarchard@chromium.org
BUG=

Review URL: https://codereview.chromium.org/1615793002 .
2016-01-21 12:03:14 +01:00