1712 Commits

Author SHA1 Message Date
Edward Lemur
d8fe1ad6bb GN: Add GN test targets.
BUG=libyuv:523
R=fbarchard@google.com, kjellander@chromium.org, magjed@chromium.org

Review URL: https://codereview.chromium.org/2317073002 .
2016-09-13 12:02:40 +02:00
Frank Barchard
48e8f8e739 Roll chromium_revision from 33f87688 to 7dcda66f
Change log: 33f87688..94111882
Full diff: 33f87688..94111882

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

Review URL: https://codereview.chromium.org/2292373002 .
2016-08-30 18:25:47 -07:00
Frank Barchard
de944ed8c7 YuvConstants declare alignment for externs as well as declarations
On visual c 2013 and earlier a warning is generated if externs
are not declared with the same alignment as the declaration, when
using /ltcg

BUG=libyuv:633
TEST=standalong test built with cl /Bv /GL /Ox /nologo a.cc b.cc /link /ltcg
R=skal@google.com

Review URL: https://codereview.chromium.org/2291533004 .
2016-08-30 11:06:46 -07:00
Frank Barchard
dc3a1295be add mergeuv test
Add test for SplitUVPlane and MergeUVPlane

Add public methods SplitUVPlanes and MergeUVPlanes based on the
optimized assembly functions that already exists.

TEST=SplitUVPlane unittest
BUG=libyuv:629
R=braveyao@chromium.org

Review URL: https://codereview.chromium.org/2279603002 .
2016-08-25 10:29:16 -07:00
Frank Barchard
c244a3e9a0 Add SplitUVPlanes and MergeUVPlanes
Add public methods SplitUVPlanes and MergeUVPlanes based on the
optimized assembly functions that already exists. Also, de-duplicate the
CPU dispatching code for these functions by moving them to helper
functions.

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

Review URL: https://codereview.chromium.org/2277603004 .
2016-08-24 16:47:24 -07:00
Frank Barchard
161e5c4569 Allow NULL for dst_y in planar formats. BUG=libyuv:631 TEST=unittests build/pass
BUG=libyuv:631
TEST=unittests build/pass
R=harryjin@google.com

Review URL: https://codereview.chromium.org/2271053003 .
2016-08-24 10:19:14 -07:00
Frank Barchard
17d31e6a4a NV12 allow NULL for Y
The conversion from NV12 and other Bi or Tri planar formats, differs only in the UV handling.  The helper function supports passing a NULL for the dst_y channel indicating you only want to do the UV conversion.

TBR=harryjin@google.com
TEST=LibYUVConvertTest.NV12ToI420_NullY (601 ms)
BUG=libyuv:626

Review URL: https://codereview.chromium.org/2276703002 .
2016-08-23 19:05:25 -07:00
Frank Barchard
d58297a2df NV12ToI420 use SplitPlane function
TBR=magjed@chromium.org
BUG=libyuv:629
TEST=LibYUVConvertTest.NV12ToI420_Opt

Review URL: https://codereview.chromium.org/2267303002 .
2016-08-22 18:35:55 -07:00
Frank Barchard
36ae08ce1c Suppress MJPEG fprintf() runtime warning
TBR=harryjin@google.com
BUG=libyuv:630
TEST=local build and try bots pass

Review URL: https://codereview.chromium.org/2264293002 .
2016-08-22 16:30:36 -07:00
Frank Barchard
920151f2b5 Change basic_types.h for fixing build failure
BUG=libyuv:630

TBR=harryjin@google.com
TEST=android build locally tested.

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

Review URL: https://codereview.chromium.org/2269793002 .
2016-08-22 16:16:49 -07:00
Frank Barchard
74491ba0c5 add blank lines to getting started
BUG=libyuv:626

Review URL: https://codereview.chromium.org/2225763003 .
2016-08-08 15:23:38 -07:00
Henrik Kjellander
d19f1c319a Roll chromium_revision 0868029..33f8768
Add a lot of new dependencies for the Android toolchain
to setup_links.py (added for WebRTC in https://codereview.webrtc.org/2190893002
and https://codereview.webrtc.org/2215633002).

There was no other way to get the Android test to build
than renaming the APK to yuv_unittests. That made it possible
to use build/apk_test.gypi (there's some bug somewhere that assumes
names doesn't start with "lib", see http://crbug.com/543820).

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

Review URL: https://codereview.chromium.org/2201893007 .
2016-08-04 13:43:17 +02:00
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