1700 Commits

Author SHA1 Message Date
Frank Barchard
e75fcb03e5 Roll libyuv chromium deps to same as webrtc jun8
contains the following changes in chromium:
2d938c84..7fa6701b

R=kjellander@chromium.org
TBR=kjellander@chromium.org
BUG=libyuv:626

Review URL: https://codereview.chromium.org/2183633002 .
2016-08-02 14:42:33 -07:00
Nico Weber
68786ccd53 gn: Don't let libyuv depend on libjpeg_turbo on iOS.
This dependency doesn't exist in the gyp build either, and it causes
problems on builds building 'all'.

BUG=633316
R=kjellander@chromium.org

Review URL: https://codereview.chromium.org/2201963002 .
2016-08-02 09:52:52 -04:00
Frank Barchard
eeea30aee8 Roll libyuv chromium deps to same as webrtc may 26
contains the following changes in chromium:
2d938c84..08680295

R=kjellander@chromium.org
TBR=kjellander@chromium.org
BUG=libyuv:626

Review URL: https://codereview.chromium.org/2183663002 .
2016-07-26 10:30:38 -07:00
Frank Barchard
3413683a15 Roll chromium_revision aa5126ff66..2d938c84f9
Change log: aa5126ff66..2d938c84f9
Full diff: aa5126ff66..2d938c84f9

No dependencies changed.
No update to Clang.

R=kjellander@chromium.org
TBR=kjellander@chromium.org
BUG=libyuv:626,libyuv:627

Review URL: https://codereview.chromium.org/2182633005 .
2016-07-25 17:32:21 -07:00
Frank Barchard
e84dcb43bd Convert libyuv to a static library in GN.
We have discovered that this should increase build performance in some cases.

http://crbug.com/627637

R=fbarchard@google.com

Review URL: https://codereview.chromium.org/2163213005 .
2016-07-20 16:33:52 -07:00
Frank Barchard
e497bc8b1a Revert "roll chromium same as webrtc jun9"
This reverts commit a817c1524013e06a9175fcd8132bfb86836bcc33.

TBR=kjellander@chromium.org
BUG=libyuv:626, webrtc:5990

Review URL: https://codereview.chromium.org/2161923003 .
2016-07-19 11:28:25 -07:00
Frank Barchard
6126968d53 Revert "Roll chromium_revision 7fa6701bc5..1a73d11e65 (398458:399420)"
This reverts commit 81d6597dc736f2318b9d2bfddf25f7f33d82f3e7.
Breaks android builds.
ninja: error: '../../testing/android/native_test/java/AndroidManifest.xml', needed by 'libyuv_unittest_apk/libyuv_unittest_apk.resources.zip', missing and no known rule to make it

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

Review URL: https://codereview.chromium.org/2159053002 .
2016-07-18 18:07:56 -07:00
Frank Barchard
81d6597dc7 Roll chromium_revision 7fa6701bc5..1a73d11e65 (398458:399420)
A fix was needed to make Android tests pass after
https://codereview.chromium.org/2043803003

Change log: 7fa6701bc5..1a73d11e65
Full diff: 7fa6701bc5..1a73d11e65

Changed dependencies:
* src/buildtools: 8dd3c8e39a..099f1da55b
* src/third_party/boringssl/src: https://boringssl.googlesource.com/boringssl.git/+log/0fc7df55c0..171b5403ee
* src/third_party/ffmpeg: 7f03319b9d..bcb8b67b8b
DEPS diff: 7fa6701bc5..1a73d11e65/DEPS

No update to Clang.

TBR=kjellander@chromium.org
BUG=libyuv:626,webrtc:5990

Review URL: https://codereview.chromium.org/2156913004 .
2016-07-18 16:30:49 -07:00
Frank Barchard
a817c15240 roll chromium same as webrtc jun9
contains the following changes in chromium:
aa5126ff..7fa6701b

some trybot scripts failing.  build bots green before roll.  Will see if commit causes build bot failure.

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

Review URL: https://codereview.chromium.org/2146073004 .
2016-07-18 15:41:35 -07:00
Frank Barchard
6508580e4b roll chromium from 1:48 to 2:59 may 24 revision.
contains the following changes in chromium:
2a818f54..aa5126ff

some trybot scripts failing.  build bots green before roll.  Will see if commit causes build bot failure.

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

Review URL: https://codereview.chromium.org/2147153004 .
2016-07-15 15:33:47 -07:00
Frank Barchard
e74086bfe3 Remove DISABLE_X86 from build.gn
Fix for duplicate define
../../third_party/libyuv/include/libyuv/scale_row.h:29:9: error: 'LIBYUV_DISABLE_X86' macro redefined [-Werror,-Wmacro-redefined]
        ^

GYP version relys on headers disabling the optimization.
This CL does the same for BUILD.gn
TBR=kjellander@chromium.org
BUG=libyuv:625

Review URL: https://codereview.chromium.org/2149823003 .
2016-07-14 12:14:22 -07:00
Frank Barchard
46a8eaaf0c fix typo in YUV
R=braveyao@chromium.org
BUG=None

Review URL: https://codereview.chromium.org/2152623002 .
2016-07-13 17:17:19 -07:00
Frank Barchard
1aa4ddd21c Attribute aligned 32 for YUV conversion structure on Intel
Fix for unaligned memory exception.

R=braveyao@chromium.org
BUG=libyuv:616

Review URL: https://codereview.chromium.org/2152553002 .
2016-07-13 12:19:26 -07:00
Frank Barchard
a7a6d8cc2e Duplicate prototype for I420ToABGR for remoting
Add alias prototype in convert_argb.h for remoting to build without the header convert_from.h

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

Review URL: https://codereview.chromium.org/2141923005 .
2016-07-12 19:12:28 -07:00
Frank Barchard
3efba30cf0 Disable yuv3 test which fails msan
BUG=604

Review URL: https://codereview.chromium.org/2146763002 .
2016-07-12 18:48:03 -07:00
Frank Barchard
abcb70f183 Test nv21 layout of Android420ToI420 function.
to Y,U,V and a pixel stride for U and V.  The pixel stride is expected to be 1 or 2.

[ RUN      ] LibYUVConvertTest.Android420ToI420_1_Any
[       OK ] LibYUVConvertTest.Android420ToI420_1_Any (253 ms)
[ RUN      ] LibYUVConvertTest.Android420ToI420_1_Unaligned
[       OK ] LibYUVConvertTest.Android420ToI420_1_Unaligned (250 ms)
[ RUN      ] LibYUVConvertTest.Android420ToI420_1_Invert
[       OK ] LibYUVConvertTest.Android420ToI420_1_Invert (254 ms)
[ RUN      ] LibYUVConvertTest.Android420ToI420_1_Opt
[       OK ] LibYUVConvertTest.Android420ToI420_1_Opt (247 ms)
[ RUN      ] LibYUVConvertTest.Android420ToI420_2_Any
[       OK ] LibYUVConvertTest.Android420ToI420_2_Any (132 ms)
[ RUN      ] LibYUVConvertTest.Android420ToI420_2_Unaligned
[       OK ] LibYUVConvertTest.Android420ToI420_2_Unaligned (122 ms)
[ RUN      ] LibYUVConvertTest.Android420ToI420_2_Invert
[       OK ] LibYUVConvertTest.Android420ToI420_2_Invert (124 ms)
[ RUN      ] LibYUVConvertTest.Android420ToI420_2_Opt
[       OK ] LibYUVConvertTest.Android420ToI420_2_Opt (119 ms)

TEST=LibYUVConvertTest.Android420ToI420_Opt
BUG=libyuv:604
R=braveyao@chromium.org

Review URL: https://codereview.chromium.org/2146733002 .
2016-07-12 18:34:04 -07:00
Frank Barchard
84e04699c2 Add libyuv:Android420ToI420 function which takes 3 pointers
to Y,U,V and a pixel stride for U and V.  The pixel stride is expected to be 1 or 2.

TEST=LibYUVConvertTest.Android420ToI420_Opt
BUG=libyuv:604
R=braveyao@chromium.org

Review URL: https://codereview.chromium.org/2114843002 .
2016-07-12 16:23:51 -07:00
Frank Barchard
4d9146bbb1 include planar functions and convert_argb for webrtc
webrtc doesnt include the headers that the functions are prototyped in.
This CL makes the convert.h include those headers to allow webrtc to
update to the head libyuv.

TBR=harryjin@google.com
BUG=libyuv:620,webrtc:6091,webrtc:6094
TESTED=local build and try bots

Review URL: https://codereview.chromium.org/2141683002 .
2016-07-11 11:37:51 -07:00
Frank Barchard
8b55286ed5 duplicate I420Rect prototype into convert for webrtc
TBR=harryjin@google.com
BUG=libyuv:618

Review URL: https://codereview.chromium.org/2132993003 .
2016-07-08 16:03:38 -07:00
Frank Barchard
5dbfd6d8e6 enable chromium code for GN, bumping warning level.
previously gyp enabled
'chromium_code': 1,
for stricter warnings, but GN disabled warnings:
configs -= [ "//build/config/compiler:chromium_code" ]
configs += [ "//build/config/compiler:no_chromium_code" ]

This CL enables strict warnings for GN as well as GYP.

R=rsesek@chromium.org
BUG=libyuv:617

Review URL: https://codereview.chromium.org/2130583003 .
2016-07-07 10:47:06 -07:00
Frank Barchard
ff9b16b828 Remove -lc++ link and document -fno-exceptions
-lc++ can cause link error on some systems and is not necessary on gcc 4.6+ so remove the link option and document how to build for gcc 4.4

TEST=CC=gcc-4.4 CXXFLAGS=-fno-exceptions CXX=g++-4.4 make -f linux.mk clean all
BUG=libyuv:616

Review URL: https://codereview.chromium.org/2126703003 .
2016-07-06 16:02:17 -07:00
Frank Barchard
303b9f03c8 Avoid gcc 4.4 indexing a vector_size(32) array error.
Mking color conversion use simple arrays within structure, which will be referenced via register pointer.

R=harryjin@google.com
BUG=libyuv:616
TEST=CC=gcc-4.4 CXX=g++-4.4 LD=ld-4.4 make -f linux.mk

Review URL: https://codereview.chromium.org/2127863003 .
2016-07-06 15:14:29 -07:00
Frank Barchard
2f101fdbda mingw64 fix - guard row_win.cc against mingw build.
The old guard only checked for defined(_M_X64) which is defined by mingw64.  Add a test for defined(_MSC_VER) which is defined for clangcl and visual c but not mingw.  mingw should use row_gcc.cc for both 32 and 64 bit.

R=harryjin@google.com
BUG=webm:1252,libyuv:613
TEST=local gcc/clang builds on linux tested and try bots for others.

Review URL: https://codereview.chromium.org/2105603002 .
2016-06-28 10:21:27 -07:00
Frank Barchard
b8ddb5a2a7 rounding for arm filter
R=wangcheng@google.com, harryjin@google.com
BUG=libyuv:607

Review URL: https://codereview.chromium.org/2093913004 .
2016-06-24 16:07:49 -07:00
Frank Barchard
1b3e4aee47 make count a memory variable for 32 bit
32 bit clang runs out of registers and compiler does core dump.
force 32 bit build to use memory variable for counter.

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

Review URL: https://codereview.chromium.org/2091913003 .
2016-06-23 20:42:10 -07:00
Frank Barchard
cc88adc620 YUV scale filter columns improved filtering accuracy
upscale a YUV image.  observe change in hue.. green especially.
disable ScaleFilterCols_SSSE3, falling back on ScaleFilterCols_C
observe hue.. green especially, is better.

was ScaleFrom1280x720_Bilinear (1620 ms)
now ScaleFrom1280x720_Bilinear (1907 ms)

BUG=libyuv:605
TEST=try bots
R=harryjin@google.com, wangcheng@google.com

Review URL: https://codereview.chromium.org/2084533006 .
2016-06-23 20:16:55 -07:00
Frank Barchard
24b9fa6671 use vectorsize on clangcl
the ScaleFilterCols_SSSE3 function fails at runtime if vectorsize is not used.

BUG=libyuv:610,libyuv:605
R=wangcheng@google.com

Review URL: https://codereview.chromium.org/2080223007 .
2016-06-23 20:14:22 -07:00
Frank Barchard
e376b06d6a Disable ScaleFilterCols_SSSE3 which produces color shift
upscale a YUV image.  observe change in hue.. green especially.
disable ScaleFilterCols_SSSE3, falling back on ScaleFilterCols_C
observe hue.. green especially, is better.

disable HAS_SCALEFILTERCOLS_SSSE3

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

Review URL: https://codereview.chromium.org/2080663003 .
2016-06-20 10:43:09 -07:00
Henrik Kjellander
5c61c59806 Add more trybots to the default set.
All these seem to be green but doesn't run by default.

TBR=fbarchard@chromium.org

Review URL: https://codereview.chromium.org/2064343002 .
2016-06-17 08:53:04 +02:00
Niels Möller
365ed3851c Treat YU12 as an alias for I420. Simplify setting of inv_crop_height.
BUG=
R=fbarchard@google.com

Review URL: https://codereview.chromium.org/2020193002 .
2016-06-16 12:49:17 +02:00
Frank Barchard
fd3e676e91 android_full_debug x86 fix - use +rm for width count
Work around for android full debug build runnign out of registers.
5 functions were running out of registers causing the compiler error
error: 'asm' operand has impossible constraints
These functions mostly have 4 pointers, a counter (width) and a tempory
eax register.  With fpic and debug using stackframes, 2 registers are
unavailable.  So a total of 8 registers are used.
Although fpic and stack frame dont apply to assembly, the compiler
reserves 2 registers.  The optimized version builds, so its likely
freeing up the registers once it knows they are not used.
These functions used to build, so compile options and/or compiler may
have updated.. likely fpic was turned on.
An attribute can be done to disable each, and will avoid using the
2 GPR registers, but they are still reserved and unavailable in debug
builds on current compilers (gcc 4.9 and clang 3.8).

R=dhrosa@google.com
BUG=libyuv:602

Review URL: https://codereview.chromium.org/2066933002 .
2016-06-14 15:25:28 -07:00
Frank Barchard
e2611a7349 document cpuid command line behavior
cpu_info_ is zero for uninitialized state and all bits are off, disabling all cpu optimizations.
the 1 bit indicates cpu_info_ is initialized avoiding calling the detection code again for performance.

MaskCpuFlags initializes the cpu ignoring existing flags, then masks with the supplied flags and stores to cpu_info_.
As a mask, -1 has no effect, enabling all cpu features that were detected, but nothing that wasnt detected.
Setting to 0 will cause the next call to re-initialize the cpu, which is same as enabling all features.
Setting mask to 1 will turn off all cpu features but keep the initialized bit on, so the next detection call wont reinitialize and the cpu features are all disabled.

So normal behavior for command line and programatic masking is:
1 = C
-1 = SIMD

TBR=harryjin@google.com
BUG=libyuv:600
TESTED=out64/Release/bin/run_libyuv_unittest -s libyuv_unittest --verbose --release --gtest_filter=*ARGBExtractAlpha* -a "--libyuv_width=1280 --libyuv_height=720 --libyuv_repeat=9999 --libyuv_flags=1 --libyuv_cpu_info=1"

Review URL: https://codereview.chromium.org/2042933002 .
2016-06-08 10:38:09 -07:00
Frank Barchard
026be3cd85 neon64 use width int directly.
width %w size modifier the int width can be passed directly to arm assembly.
For functions that take input constants, the outputs are declared as early
write using &, meaning the outputs use used before all inputs are consumed.

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

Review URL: https://codereview.chromium.org/2043073003 .
2016-06-08 10:26:53 -07:00
Frank Barchard
17e8a4d3df Remove ifdefs for neon in row_neon*.cc
ifdefs on a function level are not needed for neon functions, unless
they are conditionally enabled in row.h.  No functions are conditionally
enabled at this time, so all ifdefs can be removed from row_neon.cc and
row_neon64.cc

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

Review URL: https://codereview.chromium.org/2044223002 .
2016-06-07 14:34:13 -07:00
Frank Barchard
6546096269 ARGBExtractAlpha 16 pixels at a time for ARM
arm64   8     TestARGBExtractAlpha (10019 ms) <-original 64 bit code
arm64   8 x2  TestARGBExtractAlpha (7639 ms)
arm64   16    TestARGBExtractAlpha (7369 ms) <- new 64 bit code
thumb32 8     TestARGBExtractAlpha (9505 ms) <- original 32 bit code
thumb32 8 x2  TestARGBExtractAlpha (7400 ms)
thumb32 8 x2i TestARGBExtractAlpha (7266 ms) <- new 32 bit code
arm32   8     TestARGBExtractAlpha (10002 ms)

BUG=libyuv:572
TESTED=local test on nexus 9
R=harryjin@google.com, wangcheng@google.com

Review URL: https://codereview.chromium.org/2035573002 .
2016-06-07 10:44:28 -07:00
Frank Barchard
462be27ec8 j422 now uses j420 source code so increase error threshold to match.
R=harryjin@google.com
BUG=libyuv:597

Review URL: https://codereview.chromium.org/2024213003 .
2016-05-31 19:45:34 -07:00
Frank Barchard
b00d40160a make unittest allocator align to 64 bytes.
blur requires memory be aligned.  change the unittest allocator to guarantee 64 byte alignment.
re-enable blur any test that fails if memory is unaligned.

TBR=harryjin@google.com
BUG=libyuv:596,libyuv:594
TESTED=local build passes with row.h removed from tests.

Review URL: https://codereview.chromium.org/2019753002 .
2016-05-27 18:02:47 -07:00
Frank Barchard
ade85fb55c remove row.h from unittests
add SIMD_ALIGNED to unittest header.

BUG=libyuv:594
TESTED=local build passes with row.h removed from tests.
R=harryjin@google.com

Review URL: https://codereview.chromium.org/2001373002 .
2016-05-27 10:57:49 -07:00
Magnus Jedvert
942db3016a Add ARGBExtractAlpha function
BUG=libyuv:572
R=fbarchard@google.com

Review URL: https://codereview.chromium.org/1995293002 .
2016-05-26 10:30:57 +02:00
Frank Barchard
6020d2aa64 fix off by one in unitest BenchmarkARGBDetect_Unaligned where array is initialized beyond end by 1.
TBR=harryjin@google.com
BUG=libyuv:595
TESTED=local unittest passes on try bots

Review URL: https://codereview.chromium.org/2012603002 .
2016-05-24 15:33:27 -07:00
Frank Barchard
74a69522da white space fixes for MIPS
TBR=kjellander@chromium.org
BUG=None

Review URL: https://codereview.chromium.org/2005053004 .
2016-05-24 14:17:18 -07:00
Frank Barchard
60abed3a47 add SIMD_ALIGNED to unit_test.h
avoids need for row.h for some unittests;

R=harryjin@google.com
BUG=libyuv:594
TESTED=try bots tested.

Review URL: https://codereview.chromium.org/2004313004 .
2016-05-24 13:56:25 -07:00
Henrik Kjellander
b6bfacc2e7 Roll chromium_revision 1d144ca7f86..2a818f5413 (375480:395512)
* Update gflags to newer repository location (plain copy
  from the files in WebRTC).
* Add workarounds for mojo dependency (see
  http://bugs.webrtc.org/5629 for more details).
* Update libyuv_unittest to generate user friendly
  run-scripts for Android in out/{Debug,Release}/bin
* Fix Android test execution by adding explicit dependency
  on Chromium's base/base.gyp:base_build_config_gen

This roll also solves the compile problem for Mac ASan bots.

Change log: 1d144ca7f8..2a818f5413
Full diff: 1d144ca7f8..2a818f5413

R=magjed@chromium.org
TBR=fbarchard@chromium.org

Review URL: https://codereview.chromium.org/2001173003 .
2016-05-24 11:41:04 +02:00
Frank Barchard
7edf572e28 remove includes for duplicate functions
R=harryjin@google.com
BUG=libyuv:592
TESTED=local builds work with fewer headers

Review URL: https://codereview.chromium.org/2006943002 .
2016-05-23 17:38:26 -07:00
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