Commit Graph

4615 Commits

Author SHA1 Message Date
Alexander Alekhin
ba7b0f4c54 Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2019-12-15 11:23:46 +00:00
Alexander Alekhin
a45928045a
Merge pull request #16150 from alalek:cmake_avoid_deprecated_link_private
* cmake: avoid deprecated LINK_PRIVATE/LINK_PUBLIC

see CMP0023 (CMake 2.8.12+)

* cmake: fix 3rdparty list

- don't include OpenCV modules
2019-12-13 17:52:40 +03:00
RAJKIRAN NATARAJAN
e6ce752da1 Merge pull request #15966 from saskatchewancatch:issue-15760
Add checks for empty operands in Matrix expressions that don't check properly

* Starting to add checks for empty operands in Matrix expressions that
don't check properly.

* Adding checks and delcarations for checker functions

* Fix signatures and add checks for each class of Matrix Expr operation

* Make it catch the right exception

* Don't expose helper functions to public API
2019-12-12 19:23:57 +03:00
Alexander Alekhin
92b9888837 Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2019-12-12 13:02:19 +03:00
Alexander Alekhin
f2cce5fd8c Merge pull request #16125 from alalek:core_safe_xadd 2019-12-11 14:15:46 +00:00
Alexander Alekhin
7d61426279 Merge pull request #16124 from alalek:issue_13354 2019-12-11 14:15:23 +00:00
Alexander Alekhin
416848066c core: provide safe implementations of CV_XADD() only 2019-12-11 00:48:45 +00:00
Alexander Alekhin
76b5e19eb3 core: add "namespace cv" in CV_StaticAssert fallback implementation 2019-12-11 00:35:13 +00:00
Alexander Alekhin
a675c4937a core: OPENCV_INCLUDE_PORT_FILE for custom platform configuration 2019-12-11 00:31:45 +00:00
Alexander Alekhin
a2642d83d3 Merge pull request #16093 from alalek:core_itt_thread_name_16072 2019-12-09 18:29:53 +00:00
Paul Murphy
a011035ed6 Merge pull request #15257 from pmur:resize
* resize: HResizeLinear reduce duplicate work

There appears to be a 2x unroll of the HResizeLinear against k,
however the k value is only incremented by 1 during the unroll. This
results in k - 1 duplicate passes when k > 1.

Likewise, the final pass may not respect the work done by the vector
loop. Start it with the offset returned by the vector op if
implemented. Note, no vector ops are implemented today.

The performance is most noticable on a linear downscale. A set of
performance tests are added to characterize this.  The performance
improvement is 10-50% depending on the scaling.

* imgproc: vectorize HResizeLinear

Performance is mostly gated by the gather operations
for x inputs.

Likewise, provide a 2x unroll against k, this reduces the
number of alpha gathers by 1/2 for larger k.

While not a 4x improvement, it still performs substantially
better under P9 for a 1.4x improvement. P8 baseline is
1.05-1.10x due to reduced VSX instruction set.

For float types, this results in a more modest
1.2x improvement.

* Update U8 processing for non-bitexact linear resize

* core: hal: vsx: improve v_load_expand_q

With a little help, we can do this quickly without gprs on
all VSX enabled targets.

* resize: Fix cn == 3 step per feedback

Per feedback, ensure we don't overrun. This was caught via the
failure observed in Test_TensorFlow.inception_accuracy.
2019-12-09 14:54:06 +03:00
Alexander Alekhin
816f82682b core(trace/itt): avoid calling __itt_thread_set_name() by default
- don't override current application thread names
- set name for own threads only
2019-12-07 21:41:15 +00:00
Alexander Alekhin
c3023fb52b pre: OpenCV 4.2.0 (version++) 2019-12-06 12:58:57 +03:00
Alexander Alekhin
76a27e3399 pre: OpenCV 3.4.9 (version++) 2019-12-05 18:28:38 +00:00
Alexander Alekhin
8108fb0575 Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2019-12-05 18:27:45 +03:00
Alexander Alekhin
72f35e0626
Merge pull request #16052 from alalek:issue_16040
* calib3d: use normalized input in solvePnPGeneric()

* calib3d: java regression test for solvePnPGeneric

* calib3d: python regression test for solvePnPGeneric
2019-12-05 15:36:39 +03:00
Alexander Alekhin
f21bde4d9f
Merge pull request #16046 from alalek:issue_15990
* core: disable invalid constructors in C API by default

- C API objects will lose their default initializers through constructors

* samples: stop using of C API
2019-12-05 14:48:18 +03:00
Alexander Alekhin
95e36fd488 Merge pull request #16055 from alalek:issue_16041 2019-12-05 07:54:17 +00:00
Alexander Alekhin
4dfa0a0383 bindings: basic support for #if preprocessor directives
- #if 0
- #ifdef __OPENCV_BUILD
2019-12-04 18:42:31 +03:00
Alexander Alekhin
818585fd12 core(tls): unblock TlsAbstraction destructor call
- required to unregister callbacks from system
2019-12-04 08:27:01 +00:00
Alexander Alekhin
01a28db949 Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2019-11-29 18:57:33 +03:00
Vadim Levin
8d74101f07 Merge pull request #15955 from VadimLevin:dev/vlevin/generator_tests
Tests for argument conversion of Python bindings generator

* Tests for parsing elemental types from Python bindings

  - Add positive and negative tests for int, float, double, size_t,
    const char*, bool.
  - Tests with wrong conversion behavior are skipped.

* Move implicit conversion of bool to integer/floating types to wrong
conversion behavior.
2019-11-29 16:24:13 +03:00
Alexander Alekhin
70146700aa Merge pull request #15839 from alalek:core_simd_v_setall_template 2019-11-27 19:19:35 +00:00
Brian Wignall
af997529a1 Fix some typos 2019-11-26 18:41:19 +03:00
Brian Wignall
9276f1910b Fix some typos 2019-11-25 19:55:07 -05:00
Alexander Alekhin
ad0ab4109a Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2019-11-22 22:47:13 +00:00
Alexander Alekhin
50ac880335 Merge pull request #15971 from alalek:core_kmeans_handle_overflow 2019-11-22 21:36:02 +00:00
Natsu
54e6f5c237 Merge pull request #15970 from akemimadoka:master
* Fix android armv7 c++_static init crash

* core: move initialization of 'ios_base::Init' for Android
2019-11-22 18:42:25 +03:00
Alexander Alekhin
3266ac7667 core(kmeans): bailout if can't select cluster center 2019-11-22 14:40:02 +00:00
Alexander Alekhin
ec55b6f6db core: fix MSA build 2019-11-21 18:59:41 +03:00
Everton Constantino
75315fb297 Merge pull request #15494 from everton1984:hal_vector_get_n
Improving VSX performance of integral function

* Adding support for vector get function on VSX datatypes so the
integral function gains a bit of performance.

* Removing get as a datatype member function and implementing a new HAL
instruction v_extract_n to get the n-th element of a vector register.

* Adding SSE/NEON/AVX intrinsics.

* Implement new HAL instruction v_broadcast_element on VSX/AVX/NEON/SSE.

* core(simd): add tests for v_extract_n/v_broadcast_element

- updated docs
- commented out code to repair compilation
- added WASM and MSA default implementations

* core(simd): fix compilation

- x86: avoid _mm256_extract_epi64/32/16/8 with MSVS 2015
- x86: _mm_extract_epi64 is 64-bit only

* cleanup
2019-11-20 13:41:07 +03:00
Alexander Alekhin
318cba4ce3 Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2019-11-19 19:48:49 +00:00
Alexander Alekhin
e07a488012
Merge pull request #15925 from alalek:core_test_simd_cpp_emulation
core(test): extending tests with SIMD C++ emulation code (intrin_cpp.hpp)

* core(test): test SIMD CPP emulation code (intrin_cpp.hpp)

* core(simd): eliminate build warnings from intrin_cpp.hpp
2019-11-19 21:08:45 +03:00
clunietp
2185bce4b7 Fix 13577 2019-11-18 07:41:34 -05:00
Alexander Alekhin
fc41c18c6f Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2019-11-18 13:56:24 +03:00
Alexander Alekhin
6773b938b3 Merge pull request #15896 from alalek:build_gcc_9 2019-11-14 14:22:02 +00:00
Christoph Bachhuber
c638f085aa Refactor for clarity and avoiding code duplication
Implement GArik's comments

Remove unnecessary c_str()

Fix brace position
2019-11-12 19:22:42 +01:00
Alexander Alekhin
7ecdcf6ca6 build: GCC9 compilation 2019-11-12 18:49:34 +03:00
Alexander Alekhin
b6a58818bb Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2019-11-11 20:25:42 +00:00
Alexander Alekhin
e9dcecf9b4 Merge pull request #15826 from alalek:cmake_fix_itt_define_condition 2019-11-10 09:22:22 +00:00
Alexander Alekhin
d66aa2e0ff Merge pull request #15848 from alalek:backport_test_15842 2019-11-07 16:48:41 +00:00
Alexander Alekhin
f42d5399aa core(persistence): add more checks for implementation limitations 2019-11-07 14:19:00 +03:00
Alexander Alekhin
54d9597522 Merge pull request #15814 from i-murzov:3.4-ocl-cleanup 2019-11-06 09:54:29 +00:00
Igor Murzov
cdbfdcc363 Fix OpenCL device detection when some OpenCL platform has no devices
It's not an error if some OpenCL platform has no devices. This makes
OpenCL device detection work correctly in the following scenario:

$ OPENCV_OPENCL_DEVICE=:GPU: ./opencv_test_dnn

OpenCV version: 4.1.2-dev
OpenCV VCS version: 4.1.2-80-g467748ee98-dirty
Build type: Debug
Compiler: /usr/bin/g++  (ver 7.4.0)
Parallel framework: pthreads
CPU features: SSE SSE2 SSE3 *SSE4.1 *SSE4.2 *FP16 *AVX *AVX2 *AVX512-SKX?
Intel(R) IPP version: ippIP AVX2 (l9) 2019.0.0 Gold (-) Jul 24 2018
OpenCL Platforms:
    AMD Accelerated Parallel Processing
    Portable Computing Language
        CPU: pthread-AMD Ryzen 7 2700X Eight-Core Processor (OpenCL 1.2 pocl HSTR: pthread-x86_64-pc-linux-gnu-znver1)
    NVIDIA CUDA
        dGPU: GeForce GTX 1080 (OpenCL 1.2 CUDA)
Current OpenCL device:
    Type = dGPU
    Name = GeForce GTX 1080
    Version = OpenCL 1.2 CUDA
    Driver version = 430.26
2019-11-05 20:02:39 +03:00
TH3CHARLie
2c2716de0f core(test): add test for YAML parse multiple documents
- added removal of temporary file
2019-11-05 18:39:07 +03:00
Alexander Alekhin
dcf72e49e2 core(persistence): fix processing of multiple documents 2019-11-05 18:28:15 +03:00
Alexander Alekhin
c4c4ac28dc revert changes in modules/core/src/persistence_yml.cpp (PR15842) 2019-11-05 18:24:16 +03:00
Igor Murzov
6d5b900324 Simplify OpenCL info dumping code:
* Reduce code nesting
* Drop redundant .c_str() calls
2019-11-05 14:49:49 +03:00
TH3CHARLie
a165f55579 Merge pull request #15842 from TH3CHARLie:yaml-fix
* fix yaml parse

* add test for YAML parse multiple documents

* remove trailing whitespace in test
2019-11-04 16:27:48 +03:00
Alexander Alekhin
0d7f770996 Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2019-11-04 09:58:29 +00:00
Alexander Alekhin
a893969ec9 core(simd): v_setall template 2019-11-03 12:49:25 +00:00
yuriyluxriot
4e156a162f Merge pull request #15812 from yuriyluxriot:fls_replaces_tls
* Use FlsAlloc/FlsFree/FlsGetValue/FlsSetValue instead of TlsAlloc/TlsFree/TlsGetValue/TlsSetValue to implment TLS value cleanup when thread has been terminated on Windows Vista and above

* Fix 32-bit build

* Fixed calling convention of cleanup callback

* WINAPI changed to NTAPI

* Use proper guard macro
2019-11-01 22:33:12 +03:00
Chip Kerchner
ed7e4273cd Merge pull request #15555 from ChipKerchner:flipVectorize
* Vectorize flipHoriz and flipVert functions.

* Change v_load_mirror_1 to use vec_revb for VSX

* Only use vec_revb in ISA3.0

* Removing vec_revb code since some of the older compilers don't fully support it.

* Use new v_reverse intrinsic and cleanup code.

* Ensure there are no alignment issues with copies
2019-11-01 22:30:48 +03:00
Alexander Alekhin
657c17bb8c cmake: fix ITT define condition 2019-11-01 15:07:49 +03:00
Alexander Alekhin
5c12bafe80 Merge pull request #15805 from i-murzov:3.4 2019-10-31 20:39:16 +00:00
Igor Murzov
a9d23a6479 Fix wording in some tutorials 2019-10-30 13:27:17 +03:00
Alexander Alekhin
ea5499fa51 Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2019-10-29 20:46:51 +00:00
Alexander Alekhin
bad4e5c3eb Merge pull request #15692 from alalek:core_tls_handle_thread_termination 2019-10-29 20:40:35 +00:00
Alexander Alekhin
80c4cedd25 android: use .getRowStride() in JavaCamera2View 2019-10-28 18:45:56 +00:00
Alexander Alekhin
d8ab83600b Merge pull request #15761 from alalek:core_trace_itt_parameter 2019-10-26 21:39:08 +00:00
Alexander Alekhin
6ec5ae0215 core(trace): add ITT control parameter
- OPENCV_TRACE_ITT_ENABLE
2019-10-26 15:03:51 +00:00
Alexander Alekhin
055ffc0425 Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2019-10-24 18:21:19 +00:00
Alexander Alekhin
17e2bf5717 core(tls): implement releasing of TLS on thread termination
- move TLS & instrumentation code out of core/utility.hpp
- (*) TLSData lost .gather() method (to dispose thread data on thread termination)
- use TLSDataAccumulator for reliable collecting of thread data
- prefer using of .detachData() + .cleanupDetachedData() instead of .gather() method

(*) API is broken: replace TLSData => TLSDataAccumulator if gather required
(objects disposal on threads termination is not available in accumulator mode)
2019-10-24 06:36:18 +00:00
Chip Kerchner
5a6a49405d Merge pull request #15738 from ChipKerchner:bugInt64x2Comparison
Fixing bug with comparison of v_int64x2 or v_uint64x2

* Casting v_uint64x2 to v_float64x2 and comparing does NOT work in all cases.  Rewrite using epi64 instructions - faster too.

* Fix bad merge.

* Fix equal comparsion for non-SSE4.1. Add test cases for v_int64x2 comparisons.

* Try to fix merge conflict.

* Only test v_int64x2 comparisons if CV_SIMD_64F

* Fix compiler warning.
2019-10-22 16:37:20 +03:00
Alexander Alekhin
938d8dce06 Merge pull request #15685 from pmur:cnz64f-simd 2019-10-18 20:19:40 +00:00
Alexander Alekhin
24ebca5c59 core(simd): v_reverse() for MSA backend 2019-10-18 16:43:03 +03:00
Alexander Alekhin
a2b3cd9a2c Merge pull request #15709 from alalek:js_simd_reverse 2019-10-17 13:14:50 +00:00
Alexander Alekhin
d31da08d43 Merge pull request #15708 from alalek:js_simd_support_1.38.48 2019-10-17 13:14:34 +00:00
Alexander Alekhin
ad5d14ec0e Merge pull request #15701 from alalek:issue_15691 2019-10-16 11:13:07 +00:00
Alexander Alekhin
bce653117f Merge pull request #15700 from alalek:issue_12943 2019-10-16 11:12:49 +00:00
Alexander Alekhin
ad172726c0 js(simd): v_reverse implementation 2019-10-15 18:46:08 +03:00
Alexander Alekhin
b1a8de0901 js(simd): support Emscripten 1.38.48-upstream 2019-10-15 15:39:22 +03:00
Alexander Alekhin
823884b064 core(alloc): force initialization of memalign flag
- before main() launch
2019-10-15 13:07:11 +03:00
Alexander Alekhin
6a7d1c15d3 core(ipp): skip huge input in flip()
- IPP/SSE4.2 works well
2019-10-14 18:26:19 +03:00
Alexander Alekhin
e42560bed5 Merge pull request #15659 from malfet:use-atomic-in-getExpTab32f 2019-10-12 20:27:58 +00:00
Alexander Alekhin
d6630ab35b Merge pull request #15655 from malfet:use-atomic-in-parallel-for 2019-10-12 20:26:15 +00:00
Chip Kerchner
027769bf5d Merge pull request #15662 from ChipKerchner:addVReverseIntrinsic
* New v_reverse HAL intrinsic for reversing the ordering of a vector

* Fix conflict.

* Try to resolve conflict again.

* Try one more time.

* Add _MM_SHUFFLE. Remove non-vectorize code in SSE2. Fix copy and paste issue with NEON.

* Change v_uint16x8 SSE2 version to use shuffles
2019-10-11 18:34:17 +03:00
Paul E. Murphy
ec91a3d59d core: vectorize countNonZero64f
Improves performance a bit. 2.2x on P9 and 2 - 3x on coffee lake
x86-64.
2019-10-11 09:02:46 -05:00
Alexander Alekhin
46206b4814 Merge tag '4.1.2' 2019-10-09 23:01:31 +00:00
Alexander Alekhin
4c71dbf0af release: OpenCV 4.1.2
OpenCV 4.1.2
2019-10-09 22:53:14 +00:00
Alexander Alekhin
65573784c4 Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2019-10-09 19:46:18 +00:00
Alexander Alekhin
dd4f591d54 Merge tag '3.4.8' 2019-10-09 18:33:35 +03:00
Alexander Alekhin
6bdb9ca725 OpenCV release (3.4.8)
OpenCV 3.4.8
2019-10-09 14:42:29 +03:00
Maksim Shabunin
1ca74c3c03 Merge pull request #15544 from mshabunin:disable_posix_memalign
* Disable posix_memalign by default

* core: fix memalign parameter handling
2019-10-09 14:06:12 +03:00
Alexander Smorkalov
c3a588037a Merge pull request #15666 from seanm:Wnewline 2019-10-09 11:04:44 +00:00
Marcin Tolysz
3fd36c1be1 Merge pull request #15658 from tolysz:patch-1
* Cuda + OpenGL on ARM

There might be multiple ways of getting OpenCV compile on Tegra (NVIDIA Jetson) platform, but mainly they modify CUDA(8,9,10...) source code, this one fixes it for all installations. 
( https://devtalk.nvidia.com/default/topic/1007290/jetson-tx2/building-opencv-with-opengl-support-/post/5141945/#5141945 et al.).
This way is exactly the same as the one proposed but the code change happens in OpenCV.

* Updated,
The link provided mentions: cuda8 + 9, I have cuda 10 + 10.1 (and can confirm it is still defined this way).
NVIDIA is probably using some other "secret" backend with Jetson.
2019-10-09 11:38:10 +03:00
Sean McBride
24effe8cd6 Fixed clang -Wnewline-eof warning by adding newline to end of file 2019-10-09 10:12:09 +03:00
Nikita Shulga
ec37364762 Use std::atomic in getExpTab32f and getLogTab32f
Reads and writes to volatile bool are not guaranteed to be atomic.
2019-10-07 16:35:07 -07:00
Nikita Shulga
23288b7cb5 Use atomic operations to modify flagNestedParallelFor
This ensures uniform behavior on any C++11 compliant compiler
2019-10-07 16:26:30 -07:00
Sayed Adel
f2fe6f40c2 Merge pull request #15510 from seiko2plus:issue15506
* core: rework and optimize SIMD implementation of dotProd

  - add new universal intrinsics v_dotprod[int32], v_dotprod_expand[u&int8, u&int16, int32], v_cvt_f64(int64)
  - add a boolean param for all v_dotprod&_expand intrinsics that change the behavior of addition order between
    pairs in some platforms in order to reach the maximum optimization when the sum among all lanes is what only matters
  - fix clang build on ppc64le
  - support wide universal intrinsics for dotProd_32s
  - remove raw SIMD and activate universal intrinsics for dotProd_8
  - implement SIMD optimization for dotProd_s16&u16
  - extend performance test data types of dotprod
  - fix GCC VSX workaround of vec_mule and vec_mulo (in little-endian it must be swapped)
  - optimize v_mul_expand(int32) on VSX

* core: remove boolean param from v_dotprod&_expand and implement v_dotprod_fast&v_dotprod_expand_fast

  this changes made depend on "terfendail" review
2019-10-07 22:01:35 +03:00
Alexander Alekhin
7837ae0e19 Merge pull request #15654 from sturkmen72:patch-3 2019-10-07 16:15:04 +00:00
Marcin Tolysz
53400d86e2 Fix compiler warnings for latest cuda npp which defines this itself as:
```
#define NPP_VER_MAJOR 10
#define NPP_VER_MINOR 2
#define NPP_VER_PATCH 0
#define NPP_VER_BUILD 243

#define NPP_VERSION (NPP_VER_MAJOR * 1000 +     \
                     NPP_VER_MINOR *  100 +     \
                     NPP_VER_PATCH)
2019-10-07 11:45:26 +01:00
Suleyman TURKMEN
c0489963bb
Update copy.cpp 2019-10-07 11:59:52 +03:00
Alexander Alekhin
626bfbf309 Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2019-10-05 15:45:31 +00:00
Alexander Alekhin
98fc098216 Merge pull request #15646 from alalek:fix_avx512_detection 2019-10-05 15:30:09 +00:00
Alexander Alekhin
22d0c57a1c Merge pull request #15602 from alalek:core_softfloat_ubsan_shift 2019-10-05 15:27:35 +00:00
Alexander Alekhin
bdc097495a fix avx512 detection
- renamed Cascade Lake AVX512_CEL => AVX512_CLX (align with Intel SDE tool)
- fixed CLX instruction sets (no IFMA/VBMI)
- added flag to bypass CPU baseline check: OPENCV_SKIP_CPU_BASELINE_CHECK
2019-10-05 11:03:57 +00:00
Alexander Alekhin
3fb6617d62 Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2019-10-02 17:49:19 +03:00
Alexander Alekhin
77346d7286 core: workaround transform() inplace calls 2019-10-01 16:52:14 +03:00
Alexander Alekhin
ed9bca969c core: fix UBSAN in softfloat 2019-09-27 16:29:50 +03:00
Alexander Alekhin
bc927f9788 Merge pull request #15591 from alalek:core_persistence_fix 2019-09-26 12:59:37 +00:00
Alexander Alekhin
e2a5a6a05c Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2019-09-25 18:32:44 +00:00
Alexander Alekhin
677b94c92e Merge pull request #15579 from alalek:ocl_use_host_mem_ptr_flag 2019-09-25 15:12:59 +00:00
Alexander Alekhin
eacadf0e73 core(ocl): add flag OPENCV_OPENCL_ENABLE_MEM_USE_HOST_PTR
to control CL_MEM_USE_HOST_PTR usage
2019-09-25 15:12:36 +03:00
Alexander Alekhin
6e246ee58c core(persistence): fix reserveNodeSpace() implementation
- avoid data copying after buffer block shrink
- resize current block in case of single FileNode
2019-09-25 15:02:20 +03:00
Alexander Alekhin
d2cacac07a Merge pull request #15573 from alalek:build_cxx11_warnings 2019-09-24 22:08:55 +00:00
Wenzhao Xiang
c2096771cb Merge pull request #15371 from Wenzhao-Xiang:gsoc_2019
[GSoC 2019] Improve the performance of JavaScript version of OpenCV (OpenCV.js)

* [GSoC 2019]

Improve the performance of JavaScript version of OpenCV (OpenCV.js):
1. Create the base of OpenCV.js performance test:
     This perf test is based on benchmark.js(https://benchmarkjs.com). And first add `cvtColor`, `Resize`, `Threshold` into it.
2. Optimize the OpenCV.js performance by WASM threads:
     This optimization is based on Web Worker API and SharedArrayBuffer, so it can be only used in browser.
3. Optimize the OpenCV.js performance by WASM SIMD:
     Add WASM SIMD backend for OpenCV Universal Intrinsics. It's experimental as WASM SIMD is still in development.

* [GSoC2019] 

1. use short license header
2. fix documentation node issue
3. remove the unused `hasSIMD128()` api

* [GSoC2019]

1. fix emscripten define
2. use fallback function for f16

* [GSoC2019]

Fix rebase issue
2019-09-24 16:30:42 +03:00
Alexander Alekhin
3cf9185159 Merge pull request #15538 from terfendail:wui_checkany 2019-09-23 15:52:24 +00:00
Maksim Shabunin
c8abf2ad14 backport: fixed warnings produced by clang-9.0.0
ea3dc78986
83fc27cb99
2019-09-23 18:36:18 +03:00
Alexander Alekhin
fcc69d5a60 core(test): fix check conditions 2019-09-22 11:28:41 +00:00
Alexander Alekhin
a74fe2ec01 Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2019-09-20 21:11:49 +00:00
mipsopen-fwu
b1ea91d8bd Merge pull request #15422 from mipsopen-fwu:msa-dev
* Added MSA implementations for mips platforms. Intrinsics for MSA and build scripts for MIPS platforms are added.

Signed-off-by: Fei Wu <fwu@wavecomp.com>

* Removed some unused code in mips.toolchain.cmake.

Signed-off-by: Fei Wu <fwu@wavecomp.com>

* Added comments for mips toolchain configuration and disabled compiling warnings for libpng.

Signed-off-by: Fei Wu <fwu@wavecomp.com>

* Fixed the build error of unsupported opcode 'pause' when mips isa_rev is less than 2.

Signed-off-by: Fei Wu <fwu@wavecomp.com>

* 1. Removed FP16 related item in MSA option defines in OpenCVCompilerOptimizations.cmake.
2. Use CV_CPU_COMPILE_MSA instead of __mips_msa for MSA feature check in cv_cpu_dispatch.h.
3. Removed hasSIMD128() in intrin_msa.hpp.
4. Define CPU_MSA as 150.
Signed-off-by: Fei Wu <fwu@wavecomp.com>

* 1. Removed unnecessary CV_SIMD128_64F guarding in intrin_msa.hpp.
2. Removed unnecessary CV_MSA related code block in dotProd_8u().

Signed-off-by: Fei Wu <fwu@wavecomp.com>

* 1. Defined CPU_MSA_FLAGS_ON as "-mmsa".
2. Removed CV_SIMD128_64F guardings in intrin_msa.hpp.

Signed-off-by: Fei Wu <fwu@wavecomp.com>

* Removed unused msa_mlal_u16() and msa_mlal_s16 from msa_macros.h.

Signed-off-by: Fei Wu <fwu@wavecomp.com>
2019-09-20 19:52:48 +03:00
Vitaly Tuzov
66842f5a18 Extended v_check_any/v_check_all universal intrinsics to support 64-bit integer 2019-09-19 18:31:31 +03:00
Alexander Alekhin
b4c5b50a3e Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2019-09-13 17:15:45 +00:00
Paul E. Murphy
b465c82696 core: workaround old gcc vec_mul{e,o} (Issue #15506)
ISA 2.07 (aka POWER8) effectively extended the expanding multiply
operation to word types. The altivec intrinsics prior to gcc 8 did
not get the update.

Workaround this deficiency similar to other fixes.

This was exposed by commit 33fb253a66
which leverages the int -> dword expanding multiply.

This fixes Issue #15506
2019-09-12 09:54:02 -05:00
Alexander Alekhin
bea2c75452 Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2019-09-05 14:29:22 +03:00
Alexander Alekhin
0a13633411 Merge pull request #15444 from alalek:ocl_fix_fft_kernel 2019-09-04 16:25:34 +00:00
Alexander Alekhin
8bd2720c28 core(ocl): fix fft kernel compilation
- error: variables in the local address space can only be declared in the outermost scope of a kernel function
2019-09-03 15:46:53 +03:00
Alexander Alekhin
7e46766c8d Merge pull request #15437 from devnexen:fbsd_opencl_build_fix 2019-09-03 12:21:02 +00:00
Alexander Alekhin
9ef5373776 Merge pull request #15435 from alalek:update_version_3.4.8-pre 2019-09-03 12:04:23 +00:00
Alexander Alekhin
abd7d63b74 Merge pull request #15424 from mshabunin:add-cmake-docs 2019-09-03 10:50:45 +00:00
David Carlier
6769ee3748 OpenCL: FreeBSD build fix 2019-09-02 18:30:53 +01:00
Alexander Alekhin
3c62f3a8e3 pre: OpenCV 4.1.2 (version++) 2019-09-02 15:26:14 +03:00
Alexander Alekhin
0fda243a05 pre: OpenCV 3.4.8 (version++) 2019-09-02 14:20:49 +03:00
Alexander Alekhin
048ddbf9ee Merge pull request #15339 from pmur:dotprod-32s-vsx 2019-08-31 11:16:04 +00:00
Alexander Alekhin
2a6527e751 Merge pull request #15402 from ChipKerchner:normUnroll 2019-08-31 11:10:05 +00:00
Maksim Shabunin
f3aab47f94 Assorted documentation fixes
* removed private flann documentation
* common tutorial images moved to doc/images
* grouping issues
2019-08-31 01:50:11 +03:00
Alexander Alekhin
1661e83939 Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2019-08-30 16:22:42 +03:00
Alexander Alekhin
f224d740a3 Merge pull request #15414 from kuzi117:instr 2019-08-30 12:03:19 +00:00
Braedy Kuzma
9bf8b496d6 Use commonly supported instruction mnemonic. 2019-08-29 10:00:40 -06:00
Braedy Kuzma
d4120dd2fe Disambiguate vecpopcnt for (u)dword2. 2019-08-29 09:54:56 -06:00
Vitaly Tuzov
d134ec54c5 Extend tests for v_check_any and v_check_all intrinsics 2019-08-28 14:53:31 +03:00
Alexander Alekhin
ca7640e10f Merge pull request #15401 from ChipKerchner:vectorReduceInt8Bug 2019-08-27 19:59:39 +00:00
ChipKerchner
288e6f9c07 –Improve vectorization in the 'norm' functions 2019-08-27 12:15:19 -05:00
ChipKerchner
70b883cfeb Fix macro bug with v_reduce_min and v_reduce_max for chars in VSX 2019-08-27 11:38:53 -05:00
Vitaly Tuzov
1b40528e1a Fix for AVX2 implementation of v_check_any(), v_check_all() intrinsics 2019-08-27 14:31:23 +03:00
Alexander Alekhin
a7b954f655 Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2019-08-23 19:24:37 +03:00
Alexander Alekhin
d7409604b5 core: handle empty Mat in Mat_ assignment operators 2019-08-23 16:54:24 +03:00
Alexander Alekhin
56e832ee43 Merge pull request #15372 from alalek:core_stat_fix_intrin 2019-08-22 20:52:54 +00:00
Kazuma Furuhashi
ccecd3405a Merge pull request #15007 from 284km:fixatypo
s/last_occurence/last_occurrence/
2019-08-22 17:32:25 +03:00
Alexander Alekhin
8a0b93bc4d core: update fastmath.hpp 2019-08-22 16:43:07 +03:00
Alexander Alekhin
8b1fe8f6e0 core: fix stat SIMD code 2019-08-22 16:37:26 +03:00
Alexander Alekhin
4700722444 Merge pull request #15359 from mgehre:fix_dangling_pointer 2019-08-21 11:38:36 +00:00
Zyrin
869ea22f34 Use std::move in Mat_<T> move constructors 2019-08-21 11:12:00 +02:00
Zyrin
8ef8088686 Fix stack overflow on gcc with c++17 (#15343) 2019-08-21 10:57:03 +02:00
Matthias Gehre
0e92ac2af7 modules/core/src/ocl.cpp: Fix dangling pointer
Detected by clang trunk:
```
opencv/modules/core/src/ocl.cpp:4337:37: warning: object backing the pointer will be destroyed at the end of the full-expression [-Wdangling]
        CV_OCL_CHECK_RESULT(retval, cv::format("clCreateBuffer(capacity=%lld) => %p", (long long int)entry.capacity_, (void*)entry.clBuffer_).c_str());
                                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
opencv/modules/core/src/ocl.cpp:193:42: note: expanded from macro 'CV_OCL_CHECK_RESULT'
            if (0) { const char* msg_ = (msg); CV_UNUSED(msg_); /* ensure const char* type (cv::String without c_str()) */ } \
```
because `cv::format` yields a temporary std::string, and thus `msg_` points to a destroyed buffer.
2019-08-20 23:30:34 +02:00
Paul E. Murphy
33fb253a66 core: vectorize dotProd_32s
Use 4x FMA chains to sum on SIMD 128 FP64 targets. On
x86 this showed about 1.4x improvement.

For PPC, do a full multiply (32x32->64b), convert to DP
then accumulate. This may be slightly less precise for
some inputs. But is 1.5x faster than the above which
is about 1.5x than the FMA above for ~2.5x speedup.
2019-08-20 15:28:36 -05:00
Alexander Alekhin
19a4b51371 Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2019-08-16 18:48:08 +03:00
luz.paz
fcc7d8dd4e Fix modules/ typos
Found using `codespell -q 3 -S ./3rdparty -L activ,amin,ang,atleast,childs,dof,endwhile,halfs,hist,iff,nd,od,uint`

backporting of commit: ec43292e1e
2019-08-16 17:34:29 +03:00
luz.paz
ec43292e1e Fix modules/ typos
Found using `codespell -q 3 -S ./3rdparty -L activ,amin,ang,atleast,childs,dof,endwhile,halfs,hist,iff,nd,od,uint`
2019-08-15 18:02:09 -04:00