67 Commits

Author SHA1 Message Date
Frank Barchard
cec28e7088 PlaneScale, UVScale and ARGBScale test 3x and 4x down sample.
Intel SkylakeX
UVTest3x (1925 ms)
UVTest4x (2915 ms)
PlaneTest3x (2040 ms)
PlaneTest4x (4292 ms)
ARGBTest3x (2079 ms)
ARGBTest4x (1854 ms)

Pixel 2
ARGBTest3x (3602 ms)
ARGBTest4x (4064 ms)
PlaneTest3x (3331 ms)
PlaneTest4x (8977 ms)
UVTest3x (3473 ms)
UVTest4x (6970 ms)

Bug: b/171798872, b/171884264
Change-Id: Iebc70fed907857b6cb71a9baf2aba9861ef1e3f7
Reviewed-on: https://chromium-review.googlesource.com/c/libyuv/libyuv/+/2505601
Reviewed-by: richard winterton <rrwinterton@gmail.com>
Commit-Queue: Frank Barchard <fbarchard@chromium.org>
2020-10-28 20:41:59 +00:00
Frank Barchard
5c4dc242f4 MJPGToNV12 added and build files sorted
Bug: None
Change-Id: I87aa64a14bb3f0785f984f492e56fcf2313431ce
Reviewed-on: https://chromium-review.googlesource.com/c/libyuv/libyuv/+/2502780
Reviewed-by: Evan Shrubsole <eshr@google.com>
Commit-Queue: Frank Barchard <fbarchard@chromium.org>
2020-10-28 16:24:38 +00:00
Frank Barchard
e647902212 NV12Scale function and ScaleUV for packed UV plane bilinear scaling
Bug: libyuv:718, libyuv:838, b/168918847
Change-Id: I3300c1e7d51407b9c3201cf52b68e2e11346ff5f
Reviewed-on: https://chromium-review.googlesource.com/c/libyuv/libyuv/+/2427868
Commit-Queue: Frank Barchard <fbarchard@chromium.org>
Reviewed-by: richard winterton <rrwinterton@gmail.com>
2020-09-29 23:49:05 +00:00
Hidehiko Abe
165f39cd12 libyuv: Expand is_linux to is_linux || is_chromeos.
Currently is_linux is true on building Chrome OS,
but it is planned to set to false. This is the preparation.

Bug: chromium:1110266
Test: Build locally.
Change-Id: Icf3445a8a828e1e1a637360363845bcca5863aca
Reviewed-on: https://chromium-review.googlesource.com/c/libyuv/libyuv/+/2400818
Reviewed-by: Frank Barchard <fbarchard@chromium.org>
2020-09-15 01:08:14 +00:00
Mirko Bonadei
7050e07982 Remove comment from BUILD.gn
The goal of this CL is to trigger all the CI bots to ensure they have
all been migrated to goma RBE.

TBR=fbarchard@chromium.org
Bug: None
Change-Id: I201ac1852bac0d7f6a53f66a0ff56bc93096c005
Reviewed-on: https://chromium-review.googlesource.com/c/libyuv/libyuv/+/2274415
Reviewed-by: Mirko Bonadei <mbonadei@chromium.org>
Commit-Queue: Mirko Bonadei <mbonadei@chromium.org>
2020-06-30 07:16:22 +00:00
Frank Barchard
eed202f1f3 i444tonv12_eg example program
Bug: libyuv:858
Change-Id: I1b970f57a6ff6288afc8f60b2244e51bf6d30e78
Reviewed-on: https://chromium-review.googlesource.com/c/libyuv/libyuv/+/2169341
Reviewed-by: richard winterton <rrwinterton@gmail.com>
Commit-Queue: Frank Barchard <fbarchard@chromium.org>
2020-04-28 16:35:49 +00:00
Shiyou Yin
59b29c5f4d Fix prob of disabling mmi on loongson3 variant.
If 'mips_arch_variant=loongson3' is setted without 'mips_use_mmi=true',
undefined reference of MMI functions will be reported.

Change-Id: I2e91d63e1fa2d6c0db907aaab978227c87c991ac
Reviewed-on: https://chromium-review.googlesource.com/c/libyuv/libyuv/+/2129285
Reviewed-by: Frank Barchard <fbarchard@chromium.org>
Commit-Queue: Frank Barchard <fbarchard@chromium.org>
2020-03-31 20:25:25 +00:00
Frank Barchard
d82f4baf5f Upstream minor changes. Faster tests, Faster YUV Rotate180 and Mirror
Bug: libyuv:840, libyuv:849: b/144318948
Change-Id: I303c02ac2b838a09d3e623df7a69ffc085fe3cd2
Reviewed-on: https://chromium-review.googlesource.com/c/libyuv/libyuv/+/1914781
Reviewed-by: Miguel Casas <mcasas@chromium.org>
Commit-Queue: Frank Barchard <fbarchard@chromium.org>
2019-11-13 20:02:40 +00:00
Mirko Bonadei
7320ac5277 Re-enable optimize_max to fix UBSan.
This reverts the changes to BUILD.gn done by [1] because they were
breaking UBSan. At least one between:
//build/config/compiler:default_optimization
//build/config/compiler:optimize_max

need to be selected, this CL re-enables optimize_max since that was the
previous default.

[1] - https://chromium-review.googlesource.com/c/libyuv/libyuv/+/1790959

Bug: None
Change-Id: I136179c2e814f7aba9cc8515cc4825cbd41f8abb
Reviewed-on: https://chromium-review.googlesource.com/c/libyuv/libyuv/+/1809137
Commit-Queue: Frank Barchard <fbarchard@chromium.org>
Reviewed-by: Frank Barchard <fbarchard@chromium.org>
2019-09-17 17:39:54 +00:00
Frank Barchard
c85a7b3ae3 MMI Optimized functions I422ToARGB for 1080p video
Improves playback performance for 1080p video on www.youku.com

BUG=libyuv:841

Change-Id: Iabe7693fba276162af0290863f46e214ab86fb6c
Reviewed-on: https://chromium-review.googlesource.com/c/libyuv/libyuv/+/1790959
Reviewed-by: Miguel Casas <mcasas@chromium.org>
2019-09-11 21:06:21 +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
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
439fc3ce3d Revert "Revert "Fixing libyuv gn check.""
This reverts commit 724dbeba6c2397d99ee30542d80db1ea16d209ee.

Reason for revert: bots remain red after revert.

Original change's description:
> Revert "Fixing libyuv gn check."
> 
> This reverts commit b625f7b932fb93b877e603a1addcf613a5a0c3eb.
> 
> Reason for revert: ios builds broke shortly after this CL, so trying a revert to get builds back to green.
> 
> Original change's description:
> > Fixing libyuv gn check.
> > 
> > Starting from [1], GN is able to ensure that the inclusion or headers
> > with relative paths is matched by a GN dependency.
> > 
> > This CL fixes the libyuv build graph according to GN.
> > 
> > [1] - https://chromium-review.googlesource.com/c/chromium/src/+/827014
> > 
> > Bug: webrtc:8850
> > Change-Id: I7e0f9a8bd1ae2d205213dc75bf322be587efd1f5
> > Reviewed-on: https://chromium-review.googlesource.com/903843
> > Reviewed-by: Frank Barchard <fbarchard@chromium.org>
> > Commit-Queue: Frank Barchard <fbarchard@chromium.org>
> 
> TBR=fbarchard@chromium.org,mbonadei@chromium.org
> 
> # Not skipping CQ checks because original CL landed > 1 day ago.
> 
> Bug: webrtc:8850
> Change-Id: I8585de252bd83e2c628a37b0a0d5324ed961209e
> Reviewed-on: https://chromium-review.googlesource.com/912178
> Reviewed-by: Frank Barchard <fbarchard@chromium.org>
> Commit-Queue: Frank Barchard <fbarchard@chromium.org>

TBR=fbarchard@chromium.org,mbonadei@chromium.org

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

Bug: webrtc:8850
Change-Id: Idfd37e0e20d278b374c57d7e2c5465971aae3a52
Reviewed-on: https://chromium-review.googlesource.com/914529
Reviewed-by: Frank Barchard <fbarchard@chromium.org>
2018-02-12 19:36:52 +00:00
Frank Barchard
724dbeba6c Revert "Fixing libyuv gn check."
This reverts commit b625f7b932fb93b877e603a1addcf613a5a0c3eb.

Reason for revert: ios builds broke shortly after this CL, so trying a revert to get builds back to green.

Original change's description:
> Fixing libyuv gn check.
> 
> Starting from [1], GN is able to ensure that the inclusion or headers
> with relative paths is matched by a GN dependency.
> 
> This CL fixes the libyuv build graph according to GN.
> 
> [1] - https://chromium-review.googlesource.com/c/chromium/src/+/827014
> 
> Bug: webrtc:8850
> Change-Id: I7e0f9a8bd1ae2d205213dc75bf322be587efd1f5
> Reviewed-on: https://chromium-review.googlesource.com/903843
> Reviewed-by: Frank Barchard <fbarchard@chromium.org>
> Commit-Queue: Frank Barchard <fbarchard@chromium.org>

TBR=fbarchard@chromium.org,mbonadei@chromium.org

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

Bug: webrtc:8850
Change-Id: I8585de252bd83e2c628a37b0a0d5324ed961209e
Reviewed-on: https://chromium-review.googlesource.com/912178
Reviewed-by: Frank Barchard <fbarchard@chromium.org>
Commit-Queue: Frank Barchard <fbarchard@chromium.org>
2018-02-10 00:10:20 +00:00
Mirko Bonadei
b625f7b932 Fixing libyuv gn check.
Starting from [1], GN is able to ensure that the inclusion or headers
with relative paths is matched by a GN dependency.

This CL fixes the libyuv build graph according to GN.

[1] - https://chromium-review.googlesource.com/c/chromium/src/+/827014

Bug: webrtc:8850
Change-Id: I7e0f9a8bd1ae2d205213dc75bf322be587efd1f5
Reviewed-on: https://chromium-review.googlesource.com/903843
Reviewed-by: Frank Barchard <fbarchard@chromium.org>
Commit-Queue: Frank Barchard <fbarchard@chromium.org>
2018-02-06 18:58:35 +00:00
VladimirTechMan
56eb5a4775 Allow enabling libyuv symbols visibility for shared library targets
When developing WebRTC applications with custom video sources, libyuv's
API is often the required part of the project. For that, application
developers can link with a separate standalone instance of libyuv.
However, it is even better to avoid that binary code duplication and
link against libyuv as a part compiled into the WebRTC library.

When building WebRTC as a static library target, the symbols from libyuv
are normally accessible to the linker without any extra actions. When
building WebRTC as a shared library, that does not work as the exported
symbols are those marked as visible, while libyuv is built with the
hidden visibility setting by default.

This patch adds an extra flag to enable switching the symbol visibility
to default when building shared library targets depending on libyuv in
WebRTC and Chromium projects. By default the flag is not enabled,
preserving the prior behaviour.

Bug: NONE
Change-Id: I48893cb9f54b1e1b49a34e14434e67f91d3e5e79
Reviewed-on: https://chromium-review.googlesource.com/827746
Reviewed-by: Frank Barchard <fbarchard@chromium.org>
Commit-Queue: Frank Barchard <fbarchard@chromium.org>
2017-12-21 00:34:52 +00:00
Frank Barchard
3b81288ece Remove Mips DSPR2 code
Bug: libyuv:765
Test: build for mips still passes
Change-Id: I99105ad3951d2210c0793e3b9241c178442fdc37
Reviewed-on: https://chromium-review.googlesource.com/826404
Reviewed-by: Weiyong Yao <braveyao@chromium.org>
Commit-Queue: Frank Barchard <fbarchard@chromium.org>
2017-12-14 18:22:16 +00:00
Mirko Bonadei
d94a4867bf Using all_dependent_configs to pass libyuv_config around.
Using public_configs, client projects must rely on public_deps to
propagate configurations up in the build graph. This is bad because
public_deps allows the exposition of headers that live in another
target. This can lead to a really unhealthy build.

On the other side, all_dependent_configs is automatically propagated
up in the build graph but if a target includes a libyuv header it is
forced by GN to declare the dependency (and this will propagate
libyuv_config).

Bug: webrtc:8605, webrtc:8603
Change-Id: I4d71bb5de0b5b62a4ec110349223614f0b98e655
No-Try: True
Reviewed-on: https://chromium-review.googlesource.com/822112
Commit-Queue: Mirko Bonadei <mbonadei@chromium.org>
Reviewed-by: Patrik Höglund <phoglund@chromium.org>
2017-12-12 13:39:42 +00:00
Frank Barchard
3541e46a7e Add H010ToARGB for 10 bit YUV to ARGB
Bug: libyuv:751
Test:  LibYUVConvertTest.H010ToARGB_Opt
Change-Id: I668d3f3810e59a4fb6611503aae1c8edc7d596e7
Reviewed-on: https://chromium-review.googlesource.com/815015
Commit-Queue: Frank Barchard <fbarchard@chromium.org>
Reviewed-by: richard winterton <rrwinterton@gmail.com>
2017-12-07 20:17:50 +00:00
Frank Barchard
fecd741794 Port HammingDistance to SSSE3
Bug: libyuv:701
Test: BenchmarkHammingDistance_Opt
Change-Id: Ibdd5d382677ebef4f82a62e0d5c3b88614a3b6e4
Reviewed-on: https://chromium-review.googlesource.com/696290
Commit-Queue: Frank Barchard <fbarchard@google.com>
Reviewed-by: Cheng Wang <wangcheng@google.com>
2017-10-03 19:11:05 +00:00
Frank Barchard
bde789b176 Hamming Distance SSE2 and AVX2 optimized
Bug: None
Test: None
Change-Id: Id52663f9c957aac3172fba92d888ad1b041d5cf0
Reviewed-on: https://chromium-review.googlesource.com/692981
Reviewed-by: Cheng Wang <wangcheng@google.com>
Commit-Queue: Frank Barchard <fbarchard@google.com>
2017-10-02 22:32:54 +00:00
Frank Barchard
0b0a891cb2 Change TestScaleSumSamples_C test to allow for some float error in sum.
The sum of floats can optimize differently with vectorization, producing
a different result between NEON and C.
Adjust the unittest to allow for some difference in the sum.

The NEON version is 8 samples at a time, so the test now rounds up
the number of values to multiple of 8.

TBR=kjellander@chromium.org
Bug: libyuv:717
Test: LibYUVPlanarTest.TestScaleSumSamples_Opt


Change-Id: I2a0783780c7e0f240f7a8e4700b2a4d3e6b52d87
Reviewed-on: https://chromium-review.googlesource.com/673708
Reviewed-by: Cheng Wang <wangcheng@google.com>
2017-09-22 18:58:11 +00:00
Manojkumar Bhosale
2621c91bf1 Add MSA optimized HammingDistance and SumSquareError functions
TBR=kjellander@chromium.org
R=fbarchard@google.com

Bug:libyuv:634
Change-Id: Id0126ba5aff38817525b1efa6044f1dc2cfa1a36
Reviewed-on: https://chromium-review.googlesource.com/625739
Reviewed-by: Frank Barchard <fbarchard@google.com>
2017-09-05 21:32:33 +00:00
Frank Barchard
83ca1abe09 Change ScaleSumSamples to return Sum of Squares
TBR=kjellander@chromium.org
BUG=libyuv:717
TEST=LibYUVPlanarTest.TestScaleSumSamples_Opt

Change-Id: I5208666f3968c5c4b0f1b0c951f24216d78ee3fe
Reviewed-on: https://chromium-review.googlesource.com/607184
Reviewed-by: Cheng Wang <wangcheng@google.com>
2017-08-09 22:19:45 +00:00
Nico Weber
56022ef77f win: Rename clang_x64 to win_clang_x64 in build/toolchain/win, step 4/5.
In cross builds of chrome/win, the host and target toolchains currently
have the same name.  To fix this, rename clang_x64 to win_clang_x64.
Because the toolchain name is also referenced in libyuv, this requires
a five-sided change:

1. Introduce variable containing the toolchain name in src.git
2. Change libyuv to refer to the variable
3. Rename toolchain in src.git (including in the newly introduced var)
4* Let libyuv refer to the new name directly
5. Remove variable again

(See also https://codereview.chromium.org/2463143002)

Bug: 748501
Change-Id: I89fdf1503f1a57992a8336026d4c8d767685d53f
Reviewed-on: https://chromium-review.googlesource.com/585306
Commit-Queue: Nico Weber <thakis@chromium.org>
Reviewed-by: Nico Weber <thakis@chromium.org>
2017-07-25 19:59:42 +00:00
Nico Weber
58d3392ad3 win: Rename clang_x64 to win_clang_x64 in build/toolchain/win, step 2/5.
In cross builds of chrome/win, the host and target toolchains currently
have the same name.  To fix this, rename clang_x64 to win_clang_x64.
Because the toolchain name is also referenced in libyuv, this requires
a five-sided change:

1. Introduce variable containing the toolchain name in src.git
2* Change libyuv to refer to the variable
3. Rename toolchain in src.git (including in the newly introduced var)
4. Let libyuv refer to the new name directly
5. Remove variable again

(See also https://codereview.chromium.org/2463143002)

TBR=fbarchard
Bug: 748501
Change-Id: Id8398ab5c4615c7c33dfa5ec793fdc8c0a717e57
Reviewed-on: https://chromium-review.googlesource.com/585307
Reviewed-by: Nico Weber <thakis@chromium.org>
Reviewed-by: Frank Barchard <fbarchard@google.com>
2017-07-25 17:28:31 +00:00
Frank Barchard
d0ed025447 add exe_and_shlib_deps dependency for libc++ new[]
TBR=kjellander@chromium.org
BUG=libyuv:712
TEST=libyuv try bots build

Change-Id: Ibe2ff9ac557d5086566941d93f71d1b8048dfb58
Reviewed-on: https://chromium-review.googlesource.com/579663
Reviewed-by: Nico Weber <thakis@chromium.org>
Reviewed-by: Frank Barchard <fbarchard@google.com>
2017-07-20 21:17:25 +00:00
Frank Barchard
651ccc0c3a Fix data races in libyuv::TestCpuFlag().
Detect the compiler's support of C11 atomics, and use C11 atomics when
available.

Note that libyuv::MaskCpuFlags() is still not thread-safe.

BUG=libyuv:641
TEST= cpu_thread_test.cc adds a pthread based test
R=wangcheng@google.com

Change-Id: If05b1e16da833105a0159ed67ef20f4e61bc7abd
Reviewed-on: https://chromium-review.googlesource.com/510079
Commit-Queue: Frank Barchard <fbarchard@google.com>
Reviewed-by: Cheng Wang <wangcheng@google.com>
2017-05-24 02:09:03 +00:00
Frank Barchard
2136e349da Hamming code difference of 2 memory blocks
BUG=libyuv:701
TEST=built and disassembled for aarch64
R=kjellander@chromium.org

Change-Id: I7712b1c7934e5dfb55fda1fa7c8405c32d6964ce
Reviewed-on: https://chromium-review.googlesource.com/495327
Reviewed-by: Henrik Kjellander <kjellander@chromium.org>
Reviewed-by: Cheng Wang <wangcheng@google.com>
2017-05-08 21:37:51 +00:00
Bruce Dawson
996a2bbdb5 Avoid double compiles of libjpeg
When libyuv was changed to compile with clang-cl this also cause libjpeg
to be compiled with clang-cl, which means that it was being compiled
twice. This is generally a bad practice, it was causing duplicate symbol
warnings in some builds, and it slows builds slightly. This change
reduces the number of build steps with the default gn settings on
Win64 builds by 71 (currently from 47,200 to 47,129).

See this change that change libyuv's compilation:
https://chromium-review.googlesource.com/c/446667/

BUG=706627

Change-Id: I13e2d4ff8511350901af10f7443f3f4b89cc2499
Reviewed-on: https://chromium-review.googlesource.com/456651
Reviewed-by: Nico Weber <thakis@chromium.org>
Reviewed-by: Henrik Kjellander <kjellander@chromium.org>
Commit-Queue: Bruce Dawson <brucedawson@chromium.org>
2017-04-20 21:02:39 +00:00
Frank Barchard
78ef440a1f Rename convert to yuvconvert to avoid name clash with linux util
Bug: libyuv:695
Test: untested
Change-Id: Ib088fd16fd00bbc50868ea330b2a544e29a3385c
Reviewed-on: https://chromium-review.googlesource.com/469077
Reviewed-by: Henrik Kjellander <kjellander@chromium.org>
Commit-Queue: Frank Barchard <fbarchard@google.com>
2017-04-06 18:58:42 +00:00
Frank Barchard
2adb84e39e make gflags command line parser optional
BUG=libyuv:691
TEST=gn gen out/Release "--args=is_debug=false target_cpu=\"x64\" libyuv_include_tests=true"

Change-Id: Ib481189be884c34d9bbc30bfcf71c7969c6f4dae
Reviewed-on: https://chromium-review.googlesource.com/452736
Reviewed-by: Frank Barchard <fbarchard@google.com>
Commit-Queue: Frank Barchard <fbarchard@google.com>
2017-03-14 01:52:52 +00:00
Nico Weber
0741a3d704 Unbreak Chromium build after https://chromium-review.googlesource.com/c/446667/
Without this, `gn gen --check` for Chromium would fail with errors like:

  $ gn gen --check out/gn
  ERROR at //cc/resources/video_resource_updater.cc:25:11: Can't include
  this header from here.
  #include "third_party/libyuv/include/libyuv.h"
            ^----------------------------------
  The target:
    //cc:cc
  is including a file from the target:
    //third_party/libyuv:libyuv_internal

  [...]

  Dependency chain (there may also be others):
    //cc:cc -->
    //third_party/libyuv:libyuv --[private]-->
    //third_party/libyuv:libyuv_internal

BUG=libyuv:685, chromium:692600

Change-Id: I5e5bde2f0e4802d70bfd438793eb2460437398ee
Reviewed-on: https://chromium-review.googlesource.com/449934
Reviewed-by: Nico Weber <thakis@chromium.org>
Reviewed-by: Henrik Kjellander <kjellander@chromium.org>
Commit-Queue: Nico Weber <thakis@chromium.org>
2017-03-05 00:32:09 +00:00
Frank Barchard
bbcd785586 win64 builds use clangcl to enable optimized codepath
BUG=libyuv:685, chromium:692600
TEST=gn gen out\Release "--args=is_debug=false"
ninja -C out\Release
out\release\libyuv_unittest --libyuv_width=1280 --libyuv_height=720 --libyuv_repeat=999 --libyuv_flags=-1 --libyuv_cpu_info=-1 --gtest_filter=*ARGBToI420_Opt

Change-Id: I12ec09ae2e9bc448252aa46b137f52916403865d
Reviewed-on: https://chromium-review.googlesource.com/446667
Reviewed-by: Frank Barchard <fbarchard@google.com>
Commit-Queue: Frank Barchard <fbarchard@google.com>
2017-03-04 00:04:35 +00:00
Frank Barchard
54f2094a5e Rename mips source files to dspr2.
Add MSA detect to unittest.
Change macro to disable DSPR2 code to LIBYUV_DISABLE_DSPR2

BUG=libyuv:634
TEST=try bots

Change-Id: I9e0aa2452204fc529bb6f9e6fd93c4e1c379bba6
Reviewed-on: https://chromium-review.googlesource.com/433463
Reviewed-by: Henrik Kjellander <kjellander@chromium.org>
Commit-Queue: Frank Barchard <fbarchard@google.com>
2017-01-27 23:11:43 +00:00
Manojkumar Bhosale
6fa5e4eb78 Add MSA optimized TransposeWx8_MSA and TransposeUVWx8_MSA functions
R=fbarchard@google.com
BUG=libyuv:634

Performance Gain (vs C vectorized)
TransposeWx8_MSA          - ~2.7x
TransposeWx8_Any_MSA      - ~2.1x
TransposeUVWx8_MSA        - ~2.5x
TransposeUVWx8_Any_MSA    - ~2.7x

Performance Gain (vs C non-vectorized)
TransposeWx8_MSA          - ~4.6x
TransposeWx8_Any_MSA      - ~2.9x
TransposeUVWx8_MSA        - ~4.4x
TransposeUVWx8_Any_MSA    - ~3.7x

Review URL: https://codereview.chromium.org/2553403002 .
2016-12-15 10:06:01 +05:30
Manojkumar Bhosale
56b5bbb0be Add MSA optimized ARGB scaling functions
R=fbarchard@google.com
BUG=libyuv:634

Performance Gain (vs C vectorized)
ScaleARGBRowDown2_MSA           - ~2.6x
ScaleARGBRowDown2Linear_MSA     - ~7.9x
ScaleARGBRowDown2Box_MSA        - ~3.7x
ScaleARGBRowDownEven_MSA        - ~1.2x
ScaleARGBRowDownEvenBox_MSA     - ~3.5x

ScaleARGBRowDown2_Any_MSA       - ~2.6x
ScaleARGBRowDown2Linear_Any_MSA - ~7.9x
ScaleARGBRowDown2Box_Any_MSA    - ~3.6x
ScaleARGBRowDownEven_Any_MSA    - ~1.2x
ScaleARGBRowDownEvenBox_Any_MSA - ~3.5x

Performance Gain (vs C non-vectorized)
ScaleARGBRowDown2_MSA           - 2.6x
ScaleARGBRowDown2Linear_MSA     - 13.5x
ScaleARGBRowDown2Box_MSA        - 5.8x
ScaleARGBRowDownEven_MSA        - 1.2x
ScaleARGBRowDownEvenBox_MSA     - 3.7x

ScaleARGBRowDown2_Any_MSA       - 2.6x
ScaleARGBRowDown2Linear_Any_MSA - 13.5x
ScaleARGBRowDown2Box_Any_MSA    - 5.3x
ScaleARGBRowDownEven_Any_MSA    - 1.2x
ScaleARGBRowDownEvenBox_Any_MSA - 3.7x

Review URL: https://codereview.chromium.org/2527983002 .
2016-12-07 11:47:15 +05:30
Frank Barchard
f553db2d30 HalfFloatPlane unittest for denormal half floats
Halffloats have a limited range.  It shouldnt normally come up, but if the scale value passed in produces a small value, the half floats will be denormals, which are slow and/or flust to zero.  This test ensures they behave the same in C and SIMD and tests the performance of denormals.

TEST=TestHalfFloatPlane_denormal
BUG=libyuv:560
R=hubbe@chromium.org

Review URL: https://codereview.chromium.org/2424233004 .
2016-10-19 18:13:01 -07:00
Frank Barchard
1cd384140d GN: Add default target
This reduces the number of objects when not specifying a
build target during compile. This is especially significant for Android
where the number of objects decreases from 3322 to 1761.

BUG=libyuv:644
R=fbarchard@google.com

Review URL: https://codereview.chromium.org/2395743002 .
2016-10-05 11:17:28 -07:00
Frank Barchard
4b3b310e66 Enable optimize max for GN builds + update docs
Optimize max enables O2 for official builds.  Normally release builds
are O2 but the official build is Os, affecting performance.
The GYP file was previously updated to enable optimize max,
which enables ltcg and O2.

Documentation updated to show GN builds in docs/getting_started.md

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

Review URL: https://codereview.chromium.org/2386093003 .
2016-10-04 11:50:19 -07:00
Frank Barchard
c5323b0fdc Add MIPS SIMD Arch (MSA) optimized MirrorRow function
As per the preparation patch added in Chromium sources at,
2150943003: Add MIPS SIMD Arch (MSA) build flags for GYP/GN builds

This patch adds first MSA optimized function in libYUV project.

BUG=libyuv:634
R=fbarchard@google.com

Review URL: https://codereview.chromium.org/2285683002 .
2016-09-22 16:12:22 -07:00
Frank Barchard
5da918b48d Enable NEON for unittests on ios 64 bit.
TBR=kjellander@chromium.org
BUG=libyuv:637, chromium:646279

Review URL: https://codereview.chromium.org/2340933005 .
2016-09-16 16:46:46 -07:00
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
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
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
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
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
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
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
Frank Barchard
41c6cc7eb9 Enable optimization when compiling for NaCl with GN
PNaCl code validation fails when compiling with -O0 due to the linked
bug. Always enable optimization when compiling for NaCl to workaround
this bug.

BUG=538243
R=fbarchard@chromium.org

Review URL: https://codereview.chromium.org/1403813002 .
2015-10-12 14:52:05 -07:00