Frank Barchard
5e05f26a2b
Switch win32 to row_gcc for clangcl.
...
Bug: libyuv:900, libyuv:848, b/178283356, b/185922513
Change-Id: I7697953753391c555a778198db36412c853fb29e
Reviewed-on: https://chromium-review.googlesource.com/c/libyuv/libyuv/+/2844962
Reviewed-by: richard winterton <rrwinterton@gmail.com>
Reviewed-by: Dale Curtis <dalecurtis@chromium.org>
2021-04-22 19:32:32 +00:00
Frank Barchard
92e22cf5b6
Lint cleanup after C99 change CL
...
TBR=braveyao@chromium.org
Bug: libyuv:774
Test: git cl lint
Change-Id: I51cf8107a8db17fbc9952d610f3e4d7aac5aa743
Reviewed-on: https://chromium-review.googlesource.com/882217
Reviewed-by: Frank Barchard <fbarchard@chromium.org>
2018-01-24 19:16:03 +00:00
Frank Barchard
7e389884a1
Switch to C99 types
...
Append _t to all sized types.
uint64 becomes uint64_t etc
Bug: libyuv:774
Test: try bots build on all platforms
Change-Id: Ide273d7f8012313d6610415d514a956d6f3a8cac
Reviewed-on: https://chromium-review.googlesource.com/879922
Reviewed-by: Miguel Casas <mcasas@chromium.org>
2018-01-23 19:16:05 +00:00
Frank Barchard
80077a80c2
HammingDistance_X86 using popcnt assembly
...
popcnt has a fake dependency on the destination.
This assembly avoids the dependency by using a different
register for each popcnt.
Bug: libyuv:701
Test: LIBYUV_DISABLE_SSSE3=1 out/Release/libyuv_unittest --gtest_filter=*Ham*Opt --libyuv_width=1280 --libyuv_height=720 --libyuv_repeat=9999 --libyuv_flags=-1 --libyuv_cpu_info=-1
Change-Id: Ie1d202e2613b7fa8a3c02acd433940e92c80eafa
Reviewed-on: https://chromium-review.googlesource.com/731826
Reviewed-by: Cheng Wang <wangcheng@google.com>
Reviewed-by: Frank Barchard <fbarchard@google.com>
Commit-Queue: Frank Barchard <fbarchard@google.com>
2017-10-23 21:15:12 +00:00
Frank Barchard
8fa02df3c0
mingw fix ifdefs to use gcc source
...
mingw gcc sets the macro _M_IX86 which is normally only set
by Visual C and clangcl which are Visual C style source code
style for assembly, but gcc is not Visual C compatible.
Add _MSC_VER to most ifdefs to detect that its really Visual C
or clangcl and not mingw gcc so the gcc source code will be used.
Bug: libyuv:744
Test: CXXFLAGS=-m32 CXX=~/prebuilts/gcc/linux-x86/host/x86_64-w64-mingw32-4.8/bin/x86_64-w64-mingw32-g++ make -f linux.mk
Change-Id: I3431aa486eb769b145faa8d5eb75ed639f9d6f5e
Reviewed-on: https://chromium-review.googlesource.com/722319
Reviewed-by: Cheng Wang <wangcheng@google.com>
Commit-Queue: Frank Barchard <fbarchard@google.com>
2017-10-17 17:36:35 +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
77f6916da2
use __popcnt for visual c HammingDistance_X86
...
BUG=libyuv:701
TEST=HammingDistance unittest performance is comparable to x64
R=wangcheng@google.com
Change-Id: I8abe861e086e0162ba4c7ba6f1ef7d1c006cd9d4
Reviewed-on: https://chromium-review.googlesource.com/505454
Reviewed-by: Frank Barchard <fbarchard@google.com>
Commit-Queue: Frank Barchard <fbarchard@google.com>
2017-05-12 22:59:00 +00:00
Frank Barchard
e62309f259
clang-format libyuv
...
BUG=libyuv:654
R=kjellander@chromium.org
Review URL: https://codereview.chromium.org/2469353005 .
2016-11-07 17:37:23 -08:00
Frank Barchard
cda9d38a4e
xmmword cast for clang
...
clangcl use compare_win for 32 bit, allowing fallback and enabling avx2 code for clang.
move defines/protos to compare_row.h
fix issue with odd width ARGBCopyAlpha functions by copying destination to temp buffer, then doing alpha copy, then copy back to destination.
R=harryjin@google.com
TBR=harryjin@google.com
BUG=libyuv:484
Review URL: https://webrtc-codereview.appspot.com/59379004 .
2015-08-18 11:13:12 -07:00
Frank Barchard
baf6a3c1bd
Using the visual C source allows clangcl to fallback seamlessly to visual c, and supports SSE41 and AVX2 versions.
...
R=harryjin@google.com
BUG=libyuv:469
Review URL: https://webrtc-codereview.appspot.com/58469004 .
2015-08-17 10:47:43 -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
fbarchard@google.com
632c50f29c
include posix source for 64 bit clang builds.
...
BUG=440
TESTED=ninja -C out\Release_x64
R=bcornell@google.com
Review URL: https://webrtc-codereview.appspot.com/46259004
git-svn-id: http://libyuv.googlecode.com/svn/trunk@1407 16f28f9a-4ce2-e073-06de-1de4eb20be90
2015-05-14 21:40:05 +00:00
fbarchard@google.com
54e78d12e0
make windows code built with clangcl include the _posix source code.
...
depot_tools excludes these source files now, so they need to be manually
included.
BUG=435
TESTED=clangcl local build on windows
R=tpsiaki@google.com
Review URL: https://webrtc-codereview.appspot.com/52419004
git-svn-id: http://libyuv.googlecode.com/svn/trunk@1396 16f28f9a-4ce2-e073-06de-1de4eb20be90
2015-05-02 01:00:01 +00:00
fbarchard@google.com
c7161d1c36
Remove code alignment declspec from Visual C versions for vs2014 compatibility.
...
BUG=422
TESTED=local vs2013 build still passes.
Review URL: https://webrtc-codereview.appspot.com/45959004
git-svn-id: http://libyuv.googlecode.com/svn/trunk@1365 16f28f9a-4ce2-e073-06de-1de4eb20be90
2015-04-12 23:54:26 +00:00
fbarchard@google.com
d28cd77f99
Enable assembly for clangcl build on Windows. Previously assembly was disabled so clangcl would work, but only with C code. As clangcl mimics both Visual C and GCC, ifdefs need to pick one or the other or often you'll end up with both. In this CL we disable most Visual C code and use the GCC versions which allow assembly for both 32 and 64 bit intel.
...
BUG=412
TESTED=clang=1 build on windows
R=tpsiaki@google.com
Review URL: https://webrtc-codereview.appspot.com/51389004
git-svn-id: http://libyuv.googlecode.com/svn/trunk@1341 16f28f9a-4ce2-e073-06de-1de4eb20be90
2015-03-19 20:36:31 +00:00
fbarchard@google.com
c5aac16af9
Remove loop alignment for benefit of modern cpus that dont require alignment.
...
BUG=none
TESTED=local libyuv unittest passes
R=brucedawson@google.com , tpsiaki@google.com
Review URL: https://webrtc-codereview.appspot.com/32159004
git-svn-id: http://libyuv.googlecode.com/svn/trunk@1180 16f28f9a-4ce2-e073-06de-1de4eb20be90
2014-11-24 21:26:22 +00:00
fbarchard@google.com
91f240c5db
Move sub before branch for loops.
...
Remove CopyRow_x86
Add CopyRow_Any versions for AVX, SSE2 and Neon.
BUG=269
TESTED=local build
R=harryjin@google.com , tpsiaki@google.com
Review URL: https://webrtc-codereview.appspot.com/26209004
git-svn-id: http://libyuv.googlecode.com/svn/trunk@1175 16f28f9a-4ce2-e073-06de-1de4eb20be90
2014-11-20 21:14:27 +00:00
fbarchard@google.com
9c4c82181b
Remove alignment constraint for SSE2. Allows the optimized function to be used with unaligned memory, improving performance in that use case. Hurts performance on core2 and prior where memory was faster with movdqa instruction.
...
BUG=365
TESTED=psnr, ssim and djb2 unittests pass.
R=tpsiaki@google.com
Review URL: https://webrtc-codereview.appspot.com/22859004
git-svn-id: http://libyuv.googlecode.com/svn/trunk@1100 16f28f9a-4ce2-e073-06de-1de4eb20be90
2014-09-30 18:53:34 +00:00
fbarchard@google.com
04f40278df
yasm ALIGN uppercase
...
BUG=none
TEST=untested
R=tpsiaki@google.com
Review URL: https://webrtc-codereview.appspot.com/4769005
git-svn-id: http://libyuv.googlecode.com/svn/trunk@885 16f28f9a-4ce2-e073-06de-1de4eb20be90
2013-12-03 00:51:14 +00:00
fbarchard@google.com
c2295807bd
Reduce alignment for loops from 16 bytes to 4 bytes. Reduces outer loop overhead without hurting innerloop time.
...
BUG=none
TESTED=try bots
R=fbarchard@chromium.org , mflodman@webrtc.org
Review URL: https://webrtc-codereview.appspot.com/4659004
git-svn-id: http://libyuv.googlecode.com/svn/trunk@880 16f28f9a-4ce2-e073-06de-1de4eb20be90
2013-12-02 15:57:39 +00:00
fbarchard@google.com
823548cb3b
AVX2 hash using vex128 as first step.
...
BUG=none
TEST=BenchmarkDjb2_Opt
R=ryanpetrie@google.com
Review URL: https://webrtc-codereview.appspot.com/2219004
git-svn-id: http://libyuv.googlecode.com/svn/trunk@792 16f28f9a-4ce2-e073-06de-1de4eb20be90
2013-09-17 20:34:28 +00:00
fbarchard@google.com
0d41aee26b
Port compare functions to Nacl
...
BUG=253
TEST=none
R=nfullagar@google.com
Review URL: https://webrtc-codereview.appspot.com/1998004
git-svn-id: http://libyuv.googlecode.com/svn/trunk@752 16f28f9a-4ce2-e073-06de-1de4eb20be90
2013-08-08 23:52:34 +00:00
fbarchard@google.com
f2aa91a1ac
replace static const with static to avoid internal compiler error with gcc
...
BUG=258
TEST=try bots
R=johannkoenig@google.com
Review URL: https://webrtc-codereview.appspot.com/1944004
git-svn-id: http://libyuv.googlecode.com/svn/trunk@743 16f28f9a-4ce2-e073-06de-1de4eb20be90
2013-08-02 17:48:24 +00:00
fbarchard@google.com
eed4149e10
gcc msys compile ifdefs avoid Visual C inline
...
BUG=243
TEST=local compile with gcc
R=jkoleszar@google.com
Review URL: https://webrtc-codereview.appspot.com/1613004
git-svn-id: http://libyuv.googlecode.com/svn/trunk@717 16f28f9a-4ce2-e073-06de-1de4eb20be90
2013-06-04 17:58:57 +00:00
fbarchard@google.com
7c4ba13b31
remove empty last line
...
BUG=none
TEST=none
Review URL: https://webrtc-codereview.appspot.com/1317007
git-svn-id: http://libyuv.googlecode.com/svn/trunk@679 16f28f9a-4ce2-e073-06de-1de4eb20be90
2013-04-24 19:08:17 +00:00
fbarchard@google.com
9b4c00b908
Move vzeroupper to row functions to simplify caller and allow mix of avx2 and sse2. Impact reduced by row coalescing.
...
BUG=none
TEST=all tests pass with sde
Review URL: https://webrtc-codereview.appspot.com/1269009
git-svn-id: http://libyuv.googlecode.com/svn/trunk@641 16f28f9a-4ce2-e073-06de-1de4eb20be90
2013-04-04 05:54:59 +00:00
fbarchard@google.com
83a63e65a6
Change YUV_DISABLE_ASM to LIBYUV_DISABLE_NEON, LIBYUV_DISABLE_MIPS, LIBYUV_DISABLE_X86
...
BUG=189
TESTED=try
Review URL: https://webrtc-codereview.appspot.com/1113006
git-svn-id: http://libyuv.googlecode.com/svn/trunk@582 16f28f9a-4ce2-e073-06de-1de4eb20be90
2013-02-27 00:20:29 +00:00
fbarchard@google.com
408e574366
Use vmovd to avoid switch to sse mode
...
BUG=none
TEST=c:\intelsde\sde -hsw -- out\release\libyuv_unittest.exe --gtest_filter=*Psnr*
Review URL: https://webrtc-codereview.appspot.com/1097013
git-svn-id: http://libyuv.googlecode.com/svn/trunk@573 16f28f9a-4ce2-e073-06de-1de4eb20be90
2013-02-14 19:03:30 +00:00
fbarchard@google.com
f3ad618d40
Sum of Square Error ported to AVX2
...
BUG=187
TEST=compare_unittest
Review URL: https://webrtc-codereview.appspot.com/1099009
git-svn-id: http://libyuv.googlecode.com/svn/trunk@572 16f28f9a-4ce2-e073-06de-1de4eb20be90
2013-02-13 18:38:03 +00:00
fbarchard@google.com
cde587092f
Replace two spaces with one after .
...
BUG=none
TEST=lint
Review URL: https://webrtc-codereview.appspot.com/1063010
git-svn-id: http://libyuv.googlecode.com/svn/trunk@553 16f28f9a-4ce2-e073-06de-1de4eb20be90
2013-01-28 00:02:35 +00:00
fbarchard@google.com
66fe097a2b
Move compare modules into their own files, and scale for mips
...
BUG=none
TEST=none
Review URL: https://webrtc-codereview.appspot.com/920005
git-svn-id: http://libyuv.googlecode.com/svn/trunk@434 16f28f9a-4ce2-e073-06de-1de4eb20be90
2012-10-22 16:18:53 +00:00
fbarchard@google.com
3f467451cf
Move compare low levels into their own files, for consistency with NEON.
...
BUG=none
TEST=none
Review URL: https://webrtc-codereview.appspot.com/921004
git-svn-id: http://libyuv.googlecode.com/svn/trunk@429 16f28f9a-4ce2-e073-06de-1de4eb20be90
2012-10-20 01:23:27 +00:00