1627 Commits

Author SHA1 Message Date
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
Frank Barchard
085bfc1d04 Rename test from CropNV12 to NV12Crop
When scanning profiles for unexpected _C functions
this test function contained the substring.
Changing the name will simplify the search.

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

Review URL: https://codereview.chromium.org/1602363002 .
2016-01-19 16:43:51 -08:00
Frank Barchard
8c196f4d4c Fix testi420 unittest for odd height
When the image height for unittests was set to an
odd height, the TestI420 unittest would not fill
the complete source buffer.  This change handles
the odd height test case.
No change to library code.

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

Review URL: https://codereview.chromium.org/1609103002 .
2016-01-19 16:16:39 -08:00
Frank Barchard
58cb534962 Fix memory overwrite in YUY2ToNV12 odd wdiths
When width was odd Y channel wrote an extra pixel.
This change splits the Y from UV into a temporary
buffer and memcpy's to the destination.  Performance
is slower.

Was
YUY2ToNV12_Any (307 ms)
YUY2ToNV12_Unaligned (213 ms)
TestYUY2ToNV12 (181 ms)
YUY2ToNV12_Opt (177 ms)
YUY2ToNV12_Invert (177 ms)

Npw
YUY2ToNV12_Any (300 ms)
YUY2ToNV12_Unaligned (226 ms)
YUY2ToNV12_Invert (206 ms)
TestYUY2ToNV12 (184 ms)
YUY2ToNV12_Opt (181 ms)
TBR=harryjin@google.com
BUG=libyuv:545

Review URL: https://codereview.chromium.org/1593833002 .
2016-01-19 11:28:09 -08:00
Frank Barchard
8377c798fb Fix I420ToNV21 for wrong dst_stride_y parameter.
I420ToNV21 passes the wrong dst_stride_y when it calls I420ToNV12; parameter 8 (convert_from.cc:448) is src_stride_y but should be dst_stride_y.  This causes image corruption when converting I420 -> NV21 with mismatched luminance strides.

R=dhrosa@google.com, harryjin@google.com
BUG=libyuv:547

Review URL: https://codereview.chromium.org/1582793008 .
2016-01-14 17:38:54 -08:00
Frank Barchard
d1c6eb0887 Roll chromium to fix java_cpp_enum.py
Remove assumption on absolute paths in java_cpp_enum.py.

In java_cpp_enum.py there were assumptions on 'build' being
a component of the absolute path of the script invoking the
script. This leads to problems when other projects are using
the Chromium build toolchain (in this case libyuv), where
the script invoking GYP is located in the root of the project
dir (https://chromium.googlesource.com/libyuv/libyuv/+/master/gyp_libyuv).

TBR=harryjin@google.com, jkellander@chromium.org
BUG=libyuv:536

Review URL: https://codereview.chromium.org/1581773003 .
2016-01-14 11:39:13 -08:00
Frank Barchard
f7c6b1a196 pull gflags.gyp changes from webrtc
gflags has a build warning in the chromium version.

../../third_party/gflags/src/gflags.cc:281:53: error: unused typedef 'true_false_equal' [-Werror,-Wunused-local-typedef]
    COMPILE_ASSERT(sizeof(kTrue) == sizeof(kFalse), true_false_equal);
                                                    ^
1 error generated.
[8/231] CXX obj/chromium/src/testing/gtest/src/gtest.gtest.o

Its been reported and fixed upstream
https://github.com/gflags/gflags/issues/125

But not pulled into chromium.  Last update to flags was in 2013.
This change disables the warning.

R=harryjin@google.com, kjellander@chromium.org, jkellander@chromium.org
BUG=libyuv:536, webrtc:5397, webrtc:5398, webrtc:5399

Review URL: https://codereview.chromium.org/1581123002 .
2016-01-14 11:09:28 -08:00
Frank Barchard
081475b3c8 refactor ARGBToI422 using ARGBToI420 internally
R=harryjin@google.com
BUG=libyuv:546

Review URL: https://codereview.chromium.org/1574253004 .
2016-01-12 17:05:49 -08:00
Frank Barchard
54bbea1701 Disable I420Blend_Any test that uses C
Also renames Inverted to Invert in test name for consistency.

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

Review URL: https://codereview.chromium.org/1577973004 .
2016-01-11 18:23:04 -08:00
Frank Barchard
8030a711aa Rename rotate tests to include _Opt and disable _Odd tests
TBR=harryjin@google.com
BUG=libyuv:543

Review URL: https://codereview.chromium.org/1577723003 .
2016-01-11 17:30:27 -08:00
Frank Barchard
23c6a83561 Fix ifdef mismatch for mirroruv
Macro define and macro ifdef didnt match, leading to C code
being used.  Make macro match function name.

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

Review URL: https://codereview.chromium.org/1579023002 .
2016-01-11 16:33:36 -08:00
Frank Barchard
0e462e6f45 Remove use_sysroot=0
use_sysroot=0 is required for webrtc on linux intel builds, but
libyuv doesnt use the affected libraries, so removing this.

R=harryjin@google.com, sbc@chromium.org
BUG=libyuv:534,libyuv:542

Review URL: https://codereview.chromium.org/1566303002 .
2016-01-11 14:57:50 -08:00
Frank Barchard
fc52d8ded2 Odd width variation of scale down by 2 for subsampling
R=dhrosa@google.com, harryjin@google.com
BUG=libyuv:538

Review URL: https://codereview.chromium.org/1558093003 .
2016-01-06 15:12:17 -08:00
Frank Barchard
2560df9513 add clang variable for other apps to use
R=dhrosa@google.com
BUG=libyuv:539

Review URL: https://codereview.chromium.org/1557923005 .
2016-01-05 11:47:55 -08:00
Frank Barchard
36615d62a0 fix for InterpolateRow_AVX2
port scaledownby4_avx2 to gcc

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

Review URL: https://codereview.chromium.org/1546763002 .
2015-12-22 12:29:54 -08:00
Frank Barchard
71deb7ba3a bug fix - remove shift from InterpolateRow_AVX2
TBR=harryjin@google.com
BUG=libyuv:537

Review URL: https://codereview.chromium.org/1547703002 .
2015-12-22 10:28:48 -08:00
Frank Barchard
2cb2e9e1ad fix for InterpolateRow_AVX2
TBR=harryjin@google.com
BUG=libyuv:535

Review URL: https://codereview.chromium.org/1543773002 .
2015-12-21 18:35:12 -08:00
Frank Barchard
0f5c7660d1 Disable sysroot for x86 and x64 only
In addition to https://codereview.chromium.org/1526163002
disable sysroot only for x86 and x64.

Keep using sysroot for other archs
due to crosscompiling.

BUG=none
R=fbarchard@chromium.org

Review URL: https://codereview.chromium.org/1536403002 .
2015-12-21 11:41:14 -08:00
Frank Barchard
3f4d86053e avx2 interpolate use 8 bit
BUG=libyuv:535
R=dhrosa@google.com

Review URL: https://codereview.chromium.org/1535833003 .
2015-12-21 10:57:32 -08:00
Frank Barchard
f4447745ae Add rounding to InterpolateRow for improved quality and consistency.
Remove inaccurate specializations for 1/4 and 3/4, since they round
incorrectly.  Specialize for 100% and 50% are kept due to performance.
Make C and ARM code match SSSE3.
Make unittests expect zero difference.

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

Review URL: https://codereview.chromium.org/1533643005 .
2015-12-17 15:24:06 -08:00
Frank Barchard
1ccbf8fb7b use memory for loop counter to work around nearly out of registers
TBR=harryjin@google.com
BUG=libyuv:533

Review URL: https://codereview.chromium.org/1535433003 .
2015-12-16 17:13:37 -08:00
Frank Barchard
029f926a14 add NDEBUG for release chromium buids
BUG=libyuv:533

TBR=harryjin@google.com

Review URL: https://codereview.chromium.org/1531143002 .
2015-12-16 16:23:09 -08:00
Frank Barchard
40fd801a28 roll to same version of chromium as head webrtc
BUG=libyuv:534
R=kjellander@chromium.org

Review URL: https://codereview.chromium.org/1535493002 .
2015-12-16 15:52:14 -08:00
Frank Barchard
216e93b4e8 Fix MIPS DSPR2 build failure.
Fixing the failure:
 'TransposeWx8_Fast_MIPS_DSPR2' was not declared in this scope

BUG=none
R=fbarchard@chromium.org

Review URL: https://codereview.chromium.org/1527243002 .
2015-12-16 10:37:42 -08:00
Frank Barchard
80ca4514ef change scale down by 4 to use rounding.
TBR=harryjin@google.com
BUG=libyuv:447

Review URL: https://codereview.chromium.org/1525033005 .
2015-12-15 21:25:18 -08:00
Frank Barchard
be984a8b9a Bump chromium version and disable use_sysroot=0
TBR=harryjin@google.com
BUG=libyuv:534

Review URL: https://codereview.chromium.org/1526163002 .
2015-12-15 12:05:32 -08:00
Frank Barchard
70445ef2ef avx2 scale down by 2 for gcc
R=dhrosa@google.com, harryjin@google.com
BUG=libyuv:527

Review URL: https://codereview.chromium.org/1520423003 .
2015-12-15 10:59:20 -08:00
Frank Barchard
77346fcb4a disable I411ToARGB assembly if _DEBUG for chromium, as well as DEBUG for other builds.
TBR=harryjin@google.com
BUG=libyuv:533

Review URL: https://codereview.chromium.org/1527903002 .
2015-12-14 21:36:12 -08:00
Frank Barchard
ae55e41851 use rounding in scaledown by 2
When scaling down by 2 the formula should round consistently.
(a+b+c+d+2)/4
The C version did but the SSE2 version was doing 2 averages.
avg(avg(a,b),avg(c,d))
This change uses a sum, then rounds.

R=dhrosa@google.com, harryjin@google.com
BUG=libyuv:447,libyuv:527

Review URL: https://codereview.chromium.org/1513183004 .
2015-12-14 17:25:36 -08:00
Frank Barchard
71b60123dc GN: Fix neon files not being included for arm64
BUG=568883
R=fbarchard@chromium.org

Review URL: https://codereview.chromium.org/1516653004 .
2015-12-14 11:48:06 -08:00