110 Commits

Author SHA1 Message Date
Frank Barchard
cdd3bae848 TestI400LargeSize fix for warning message build error
- change %ld to %zd for size_t printf warnings
- disable TestI400LargeSize when disabling SLOW_TESTS
- disable cpuid tests that read proc/cpuinfo test data files
- add ifdef around timers to allow hexagon build
- remove faulty hybrid detect
- remove old mips LIBYUV_DISABLE_DSPR2 reference in gyp build
- apply clang-format

Bug: 434382656
Change-Id: Id74812e6ef29d4a8d0ff967a9189d249b80816d4
Reviewed-on: https://chromium-review.googlesource.com/c/libyuv/libyuv/+/6812825
Reviewed-by: Jeremy Leconte <jleconte@google.com>
Reviewed-by: richard winterton <rrwinterton@gmail.com>
2025-08-01 12:03:11 -07:00
WANG Xuerui
6ecfe106c3 Enable explicit control over LoongArch LSX & LASX for GYP builds
And enable LASX by default for LoongArch builds, because LASX is
widely supported among LoongArch desktops and servers, and performance
is better than with LSX alone.

Because the LoongArch SIMD code is written to only compile if the
respective codegen option is enabled, but the defaults and availability
differ between compiler versions and target `-march` setting, the
codegen flags are explicitly added to CFLAGS for wider compatibility.

Bug: None
Change-Id: I735ceac0f6b46eea2155e58ecf3630383ef5b728
Reviewed-on: https://chromium-review.googlesource.com/c/libyuv/libyuv/+/6241804
Reviewed-by: Frank Barchard <fbarchard@chromium.org>
Reviewed-by: Mirko Bonadei <mbonadei@chromium.org>
2025-05-30 10:17:27 -07: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
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
Frank Barchard
bd10875846 modified libyuv.gyp so that it no longer depends on libjpeg.gyp, which does not exist anymore.
BUG=libyuv:666
TESTED= unittests built and passed with jpeg disabled.
R=kjellander@chromium.org

Review-Url: https://codereview.chromium.org/2585373002 .
2016-12-19 11:57:49 -08:00
Frank Barchard
34a29bf756 fix warning on visual C for mips cpu detect
follow up warning fixs
cpu_id.cc(167): warning C4267: 'initializing': conversion from 'size_t' to 'int', possible loss of data
lint warning: cpu_id.cc:171:  Missing space before ( in if(  [whitespace/parens] [5]

TBR=manojkumar.bhosale@imgtec.com
BUG=libyuv:634
TEST=try bots for windows.

Review URL: https://codereview.chromium.org/2365813002 .
2016-09-22 18:25:52 -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
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
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
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
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
2c77dbb976 disable unused argument warning for clang builds.
normally this warning is disabled but for nacl builds that
use clang its not.  this CL makes the option universally disabled
for all clang based builds.

BUG=libyuv:581
TESTED=native_client/build/gyp_nacl all.gyp -Dgtest_target_type=executable -Dmsan=0 & ninja -C out/Debug libyuv
R=kjellander@chromium.org

Review URL: https://codereview.chromium.org/1865183002 .
2016-04-11 11:43:08 -07:00
Frank Barchard
837aa1e2af disable assembly in header for msan=1
GYP_DEFINES="target_arch=x64 msan=1" ./gyp_libyuv
ninja -j7 -C out/Release

R=impjdi@google.com
BUG=libyuv:575

Review URL: https://codereview.chromium.org/1805683003 .
2016-03-15 18:45:38 -07: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
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
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
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
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
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
bb66c021ff Re-enable LLVM LTO on Neon targets.
LTO was disabled due to a GCC compiler bug that does not affect LLVM.
This fixes the build in the cfi_vptr==1 configuration, which requires LLVM LTO.

R=pcc@google.com
BUG=chromium:469376

Review URL: https://webrtc-codereview.appspot.com/57659004.
2015-08-18 15:26:52 -07:00
fbarchard@google.com
7be3bc65a1 enable speed optimization for libyuv
BUG=439
TESTED=out\release\libyuv_unittest --gtest_filter=*I420ToARGB_Opt
R=bcornell@google.com

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

git-svn-id: http://libyuv.googlecode.com/svn/trunk@1405 16f28f9a-4ce2-e073-06de-1de4eb20be90
2015-05-11 21:58:42 +00:00
fbarchard@google.com
31c875fe19 enable chromium_code=1 to increase warning level. this will enable the same warnings as when built within chrome, helping avoid breakage in future.
BUG=432
TESTED=local windows build
R=bcornell@google.com

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

git-svn-id: http://libyuv.googlecode.com/svn/trunk@1386 16f28f9a-4ce2-e073-06de-1de4eb20be90
2015-04-28 18:43:09 +00:00
yang.zhang@arm.com
1a1cf3f4db Enable NEON functions for ARM32
In init functions, whether the code of NEON initialization is compiled
is decided by macros HAS_XXXX_NEON. These macros HAS_XXXX_NEON are defined
according to __ARM_NEON__/LIBYUV_NEON/__aarch64__. For ARM32, "-mfpu=neon"
isn't passed to the files containing init functions. So __ARM_NEON__ is
undefined which leads to NEON functions are disabled.
In this patch, LIBYUV_NEON is added to enable HAS_XXXX_NEON definition for ARM32.

BUG=none
TESTED=libyuv_unittest on android of ARM32/ARM64
R=fbarchard@google.com

Change-Id: Ib4201e7152d2aeb0ba80d18bbbd0487151e4564e

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

git-svn-id: http://libyuv.googlecode.com/svn/trunk@1277 16f28f9a-4ce2-e073-06de-1de4eb20be90
2015-02-11 08:30:11 +00:00
fbarchard@google.com
c7bd39abae Pass neon option to compiler, not assembler, so ifdefs will work.
BUG=371
TESTED=locally tested by arm
R=harryjin@google.com

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

git-svn-id: http://libyuv.googlecode.com/svn/trunk@1210 16f28f9a-4ce2-e073-06de-1de4eb20be90
2014-12-18 17:24:48 +00:00
fbarchard@google.com
44b8fd363e Pass neon option to assembler but not the compiler. Step 1 of unifying the two libraries back into one.
BUG=371
TESTED=local ios builds ignore the option, but still work.
R=brucedawson@google.com, harryjin@google.com

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

git-svn-id: http://libyuv.googlecode.com/svn/trunk@1145 16f28f9a-4ce2-e073-06de-1de4eb20be90
2014-10-28 23:15:16 +00:00
zhongwei.yao@arm.com
0eb196f8db clear aarch64 related macro and fix bugs
fix 2 bugs:
 - build bug libyuv.gyp
 - runtime bug in ScaleRowDown38_2_Box_NEON
BUG=
TESTED=libyuv_unittest
R=fbarchard@google.com, fbarchard@chromium.org

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

git-svn-id: http://libyuv.googlecode.com/svn/trunk@1117 16f28f9a-4ce2-e073-06de-1de4eb20be90
2014-10-09 02:00:40 +00:00
fbarchard@google.com
bb5cc129e5 For android arm64 dont specify neon flag.
BUG=364
TESTED=try bots
R=tpsiaki@google.com

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

git-svn-id: http://libyuv.googlecode.com/svn/trunk@1099 16f28f9a-4ce2-e073-06de-1de4eb20be90
2014-09-30 01:35:56 +00:00
fbarchard@google.com
aec76f2e30 add stride to pointer in C and pass as register to inline.
BUG=357
TESTED=clang on ios
R=tpsiaki@google.com

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

git-svn-id: http://libyuv.googlecode.com/svn/trunk@1086 16f28f9a-4ce2-e073-06de-1de4eb20be90
2014-09-19 22:51:39 +00:00
fbarchard@google.com
f7d9b9fb13 change vector range notation to a list of registers for clang compatibility. break compare into 2 neon files for consistency with other neon64 files.
BUG=357
TESTED=local ios build
R=harryjin@google.com

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

git-svn-id: http://libyuv.googlecode.com/svn/trunk@1085 16f28f9a-4ce2-e073-06de-1de4eb20be90
2014-09-15 23:39:43 +00:00
zhongwei.yao@arm.com
4667addfb8 Add a placeholder file for ARM64 Rotate Neon implementation
BUG=319
TESTED=libyuv_unittest
R=fbarchard@google.com

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

git-svn-id: http://libyuv.googlecode.com/svn/trunk@1073 16f28f9a-4ce2-e073-06de-1de4eb20be90
2014-09-01 08:50:49 +00:00
fbarchard@google.com
6fb3ed37f5 move lto condition into existing condition statement.
BUG=354
TESTED=gclient runhooks
R=fdegans@chromium.org

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

git-svn-id: http://libyuv.googlecode.com/svn/trunk@1062 16f28f9a-4ce2-e073-06de-1de4eb20be90
2014-08-25 19:12:50 +00:00
fbarchard@google.com
c2a78ebf45 Add LTO support for Android Chromium.
BUG=354
This is to add support for a Link-Time Optimizations experiment in Android
Chromium. As it is disabled by default, it won't change anything for most
configurations.

R=tpsiaki@google.com

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

git-svn-id: http://libyuv.googlecode.com/svn/trunk@1061 16f28f9a-4ce2-e073-06de-1de4eb20be90
2014-08-25 18:01:50 +00:00
fbarchard@google.com
0c60052547 For xcode disable pch option so includes will use the .h instead of expecting a .pch.
BUG=none
TESTED=untested
R=noahric@chromium.org

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

git-svn-id: http://libyuv.googlecode.com/svn/trunk@1059 16f28f9a-4ce2-e073-06de-1de4eb20be90
2014-08-21 23:30:06 +00:00
zhongwei.yao@arm.com
0ce3733797 Add a placeholder file for ARM64 Scale Neon implementation
BUS=319
TESTED=libyuv_unit_test
R=fbarchard@google.com

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

git-svn-id: http://libyuv.googlecode.com/svn/trunk@1051 16f28f9a-4ce2-e073-06de-1de4eb20be90
2014-08-20 02:54:59 +00:00
zhongwei.yao@arm.com
1afdfb3da8 arm64 neon optimization building is enabled
git-svn-id: http://libyuv.googlecode.com/svn/trunk@1042 16f28f9a-4ce2-e073-06de-1de4eb20be90
2014-08-13 03:45:11 +00:00
ashok.bhat@gmail.com
9453f7c494 Add a placeholder file for ARM64 Row Neon implementation
BUG=319
TEST=libyuv_unittest
R=fbarchard@google.com

Change-Id: I9fdc355d285062d32c11dba4e240d32f5b1bcb80
Signed-off-by: Ashok Bhat <ashok.bhat@arm.com>

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

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

git-svn-id: http://libyuv.googlecode.com/svn/trunk@1041 16f28f9a-4ce2-e073-06de-1de4eb20be90
2014-08-07 13:40:18 +00:00
fbarchard@google.com
455c66b437 Add a gyp define LIBYUV_DISABLE_JPEG to not build jpeg library
BUG=346
TESTED=set GYP_DEFINES=target_arch=ia32 libyuv_disable_jpeg=1 & python gyp_libyuv -fninja -G msvs_version=2010 libyuv_test.gyp
R=harryjin@google.com

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

git-svn-id: http://libyuv.googlecode.com/svn/trunk@1038 16f28f9a-4ce2-e073-06de-1de4eb20be90
2014-07-28 21:48:43 +00:00
kjellander@google.com
103427718a Disable assembly optimizations in MemorySanitizer builds.
BUG=chromium:344505, chromium:373739
R=kjellander@google.com, mflodman@chromium.org

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

Patch from Sergey Matveev <earthdok@chromium.org>.

git-svn-id: http://libyuv.googlecode.com/svn/trunk@1028 16f28f9a-4ce2-e073-06de-1de4eb20be90
2014-07-03 18:39:32 +00:00
fbarchard@google.com
c99fa63f6b arm64 initial port using C
BUG=319
TESTED=GYP_DEFINES="OS=ios target_arch=armv7 target_subarch=64" GYP_CROSSCOMPILE=1 GYP_GENERATOR_FLAGS="output_dir=out_ios" ./build/gyp_chromium -f ninja --depth=. libyuv_test.gyp  && ninja -j7 -C out_ios/Debug-iphoneos
R=tpsiaki@google.com

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

git-svn-id: http://libyuv.googlecode.com/svn/trunk@994 16f28f9a-4ce2-e073-06de-1de4eb20be90
2014-03-29 00:19:06 +00:00
fbarchard@google.com
4b3428e7d5 for ios enable neon for arm but not ia32 which is simulator.
BUG=308
TESTED=try bots
R=noahric@google.com

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

git-svn-id: http://libyuv.googlecode.com/svn/trunk@979 16f28f9a-4ce2-e073-06de-1de4eb20be90
2014-02-06 00:21:35 +00:00
fbarchard@google.com
9a46283c6d Allow system jpeg to be used instead of libjpeg_turbo.
BUG=56
TESTED=untested
R=tpsiaki@google.com

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

git-svn-id: http://libyuv.googlecode.com/svn/trunk@975 16f28f9a-4ce2-e073-06de-1de4eb20be90
2014-01-18 02:07:16 +00:00
fbarchard@google.com
f5f5bbf8f9 Fix neon builds for ios. libyuv_neon macro is not applicable to neon. its only needed for arm code that is not neon but will link to neon.
BUG=308
TESTED=try bots
R=jzern@chromium.org

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

git-svn-id: http://libyuv.googlecode.com/svn/trunk@973 16f28f9a-4ce2-e073-06de-1de4eb20be90
2014-01-15 03:15:55 +00:00
fbarchard@google.com
d3f1821b47 use arm only to determine if neon should be build
BUG=307
TESTED=try bots
R=yfriedman@chromium.org

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

git-svn-id: http://libyuv.googlecode.com/svn/trunk@971 16f28f9a-4ce2-e073-06de-1de4eb20be90
2014-01-14 01:48:47 +00:00
fbarchard@google.com
252e14a8a5 check target arch is arm for neon code on android
BUG=307
TESTED=untested
R=michaelbai@chromium.org, noahric@chromium.org, yfriedman@chromium.org

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

git-svn-id: http://libyuv.googlecode.com/svn/trunk@970 16f28f9a-4ce2-e073-06de-1de4eb20be90
2014-01-14 01:23:51 +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