18 Commits

Author SHA1 Message Date
WANG Xuerui
1e40e34573 Add missing files for loong64 GYP build
There are a few added source files since the (re-)addition of GYP build
support, for better SIMD optimization support (AArch64 SME & SVE,
LoongArch LSX & LASX, RISC-V RVV). This CL covers the LoongArch part in
preparation of fixing GYP builds for this architecture.

The files' arch-specific contents are all gated behind preprocessor
macro checks, so it is safe to have everything included in the build
unconditionally.

Bug: None
Change-Id: I2da37c1db79c2d8316ae42079e79efed2a2030a9
Reviewed-on: https://chromium-review.googlesource.com/c/libyuv/libyuv/+/6241803
Reviewed-by: Wan-Teh Chang <wtc@google.com>
Reviewed-by: Frank Barchard <fbarchard@chromium.org>
2025-04-15 14:03:27 -07:00
Byoungchan Lee
4e8a843bfc Fix missing headers in GN/GYP build files
While porting libyuv's GN to other build systems, I discovered that
several headers were absent in the GN and GYP build files. These headers
are utilized in the source files but were not included in the GN and GYP
build configurations.

Without these headers, the Bazel build fails with the following error:
ERROR: /path/to/bazel/external/libyuv/BUILD.bazel:4:11: Compiling source/compare.cc failed: (Exit 1): clang-17 failed: error executing CppCompile command (from target @@libyuv//:libyuv) /usr/bin/clang-17 -U_FORTIFY_SOURCE -fstack-protector -Wall -Wthread-safety -Wself-assign -Wunused-but-set-parameter -Wno-free-nonheap-object -fcolor-diagnostics -fno-omit-frame-pointer '-std=c++14' ... (remaining 32 arguments skipped)

Use --sandbox_debug to see verbose messages from the sandbox and retain the sandbox build root for debugging
external/libyuv/source/compare.cc:20:10: fatal error: 'libyuv/compare_row.h' file not found
   20 | #include "libyuv/compare_row.h"
      |          ^~~~~~~~~~~~~~~~~~~~~~
1 error generated.

Bug: None
Change-Id: I39c4c545e381d5f28c749f9ba8940e039aa55dfc
Reviewed-on: https://chromium-review.googlesource.com/c/libyuv/libyuv/+/5380588
Reviewed-by: Mirko Bonadei <mbonadei@chromium.org>
Commit-Queue: Mirko Bonadei <mbonadei@chromium.org>
2024-04-01 09:19:24 +00:00
Frank Barchard
fa6da40666 Add libyuv.gyp build files
- libyuv.gyp for build targets
- libyuv.gypi for list of source files

Bug: None
Change-Id: I915bf0c74514694ff07a93150fc5dbd9e3ab8356
Reviewed-on: https://chromium-review.googlesource.com/c/libyuv/libyuv/+/3538858
Reviewed-by: Mirko Bonadei <mbonadei@chromium.org>
Commit-Queue: Frank Barchard <fbarchard@chromium.org>
2022-03-21 23:48:16 +00:00
Frank Barchard
759188cf02 Remove GYP support from libyuv
Also remove --if-needed from clang update in DEPS.

Bug: libyuv:816, libyuv:814
Test: bots still build and local GN build works

Change-Id: I91998b8eee1b0cbe344f02a9369a1bbc45cb0140
Reviewed-on: https://chromium-review.googlesource.com/1204790
Reviewed-by: Nico Weber <thakis@chromium.org>
2018-09-04 18:29:39 +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
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
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
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
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
2d601aaf34 merge neon source files back into single libyuv library
previously the neon source code was broken into a separate
library built with -mfpu=neon for the neon assembly, while
the C code was built without neon.

In this change, the neon code is added to the main library
and all code built with neon.

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

Review URL: https://codereview.chromium.org/1392043003 .
2015-10-07 21:16:51 -07:00
Frank Barchard
2fa4f5a3ea Adds files and functions for rotate any, but does not hook them up to the caller.
rotate any

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

Review URL: https://webrtc-codereview.appspot.com/53769004.
2015-07-27 10:32:08 -07:00
Frank Barchard
3d190ee9f1 break rotate into files by cpu in preparation for optimization.
R=bcornell@google.com
BUG=libyuv:464

Review URL: https://webrtc-codereview.appspot.com/51289004.
2015-07-14 10:23:10 -07:00
fbarchard@google.com
2e9f3e5cf5 rename source files from row_posix.cc etc to row_gcc.cc to avoid gyp build filtering out source files from build when on windows with clang. The source code contained in row_gcc.cc is gcc syntax inline assembly available for any platform that supports gcc or clang for intel cpus.
BUG=440
TESTED=try bots
R=harryjin@google.com

Review URL: https://webrtc-codereview.appspot.com/56579004

git-svn-id: http://libyuv.googlecode.com/svn/trunk@1430 16f28f9a-4ce2-e073-06de-1de4eb20be90
2015-06-09 17:27:52 +00:00
yang.zhang@arm.com
d6d7de5742 Add ScaleFilterCols_NEON for ARM32/64
ARM32/64 NEON versions of ScaleFilterCols_NEON are implemented.

BUG=319
TESTED=libyuvTest.* on ARM32/64 with Android
R=fbarchard@google.com

Change-Id: I5b0838769ffb0182155d7cd6bcc520eb81eb5c4e

Review URL: https://webrtc-codereview.appspot.com/41349004

git-svn-id: http://libyuv.googlecode.com/svn/trunk@1340 16f28f9a-4ce2-e073-06de-1de4eb20be90
2015-03-19 03:55:05 +00:00
fbarchard@google.com
0887315390 Remove bayer format support from libyuv. This format is very rare and used on legacy hardware. Its not well optimized and has bugs related to odd widths. Removing the format will allow tests to pass under more circumstances, run faster and allow focus on higher priority quality and performance issues.
BUG=301
TESTED=local unittests build/pass on windows gyp build.
R=harryjin@google.com

Review URL: https://webrtc-codereview.appspot.com/38059004

git-svn-id: http://libyuv.googlecode.com/svn/trunk@1270 16f28f9a-4ce2-e073-06de-1de4eb20be90
2015-02-09 19:58:19 +00:00
sergeyu@google.com
0d8da8a372 Compile libyuv for PNaCl.
New target libyuv_untrusted compiles libyuv for PNaCl.

BUG=276739
R=fbarchard@google.com

Review URL: https://webrtc-codereview.appspot.com/6299004

git-svn-id: http://libyuv.googlecode.com/svn/trunk@969 16f28f9a-4ce2-e073-06de-1de4eb20be90
2014-01-14 01:01:19 +00:00