Commit Graph

5109 Commits

Author SHA1 Message Date
HAN Liutong
3e4a566e46
Merge pull request #21351 from hanliutong:rvv-clang
* Update universal intrinsics of RVV back-end.

* Use array instead of malloc.
2022-03-30 20:04:34 +00:00
Alexander Alekhin
1339ebaa84 Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2022-03-26 16:00:28 +00:00
Alexander Alekhin
12bae51384 Merge pull request #21759 from pkubaj:patch-1 2022-03-23 19:13:12 +00:00
Alexander Alekhin
9d16612a9b Merge pull request #21756 from komakai:fix-pow 2022-03-22 13:45:35 +00:00
Maksim Shabunin
593996216f cartToPolar/polarToCart: disable inplace mode 2022-03-21 16:06:12 +03:00
pkubaj
f3699b5ac8
Fix build with LLVM 13 on ppc64le
/wrkdirs/usr/ports/graphics/opencv/work/opencv-4.5.5/modules/core/include/opencv2/core/vsx_utils.hpp:352:12: warning: 'vec_permi' macro redefined [-Wmacro-redefined]
#   define vec_permi(a, b, c) vec_xxpermdi(b, a, (3 ^ (((c) & 1) << 1 | (c) >> 1)))
           ^
/usr/lib/clang/13.0.0/include/altivec.h:13077:9: note: previous definition is here
#define vec_permi(__a, __b, __c)                                               \
        ^
/wrkdirs/usr/ports/graphics/opencv/work/opencv-4.5.5/modules/core/include/opencv2/core/vsx_utils.hpp:370:25: error: redefinition of 'vec_promote'
VSX_FINLINE(vec_dword2) vec_promote(long long a, int b)
                        ^
/usr/lib/clang/13.0.0/include/altivec.h:14604:1: note: previous definition is here
vec_promote(signed long long __a, int __b) {
^
/wrkdirs/usr/ports/graphics/opencv/work/opencv-4.5.5/modules/core/include/opencv2/core/vsx_utils.hpp:377:26: error: redefinition of 'vec_promote'
VSX_FINLINE(vec_udword2) vec_promote(unsigned long long a, int b)
                         ^
/usr/lib/clang/13.0.0/include/altivec.h:14611:1: note: previous definition is here
vec_promote(unsigned long long __a, int __b) {
^
/wrkdirs/usr/ports/graphics/opencv/work/opencv-4.5.5/modules/core/include/opencv2/core/hal/intrin_vsx.hpp:1045:22: error: call to 'vec_rsqrt' is ambiguous
{ return v_float32x4(vec_rsqrt(x.val)); }
                     ^~~~~~~~~
/usr/lib/clang/13.0.0/include/altivec.h:8472:34: note: candidate function
static vector float __ATTRS_o_ai vec_rsqrt(vector float __a) {
                                 ^
/wrkdirs/usr/ports/graphics/opencv/work/opencv-4.5.5/modules/core/include/opencv2/core/vsx_utils.hpp:362:29: note: candidate function
    VSX_FINLINE(vec_float4) vec_rsqrt(const vec_float4& a)
                            ^
/wrkdirs/usr/ports/graphics/opencv/work/opencv-4.5.5/modules/core/include/opencv2/core/hal/intrin_vsx.hpp:1047:22: error: call to 'vec_rsqrt' is ambiguous
{ return v_float64x2(vec_rsqrt(x.val)); }
                     ^~~~~~~~~
/usr/lib/clang/13.0.0/include/altivec.h:8477:35: note: candidate function
static vector double __ATTRS_o_ai vec_rsqrt(vector double __a) {
                                  ^
/wrkdirs/usr/ports/graphics/opencv/work/opencv-4.5.5/modules/core/include/opencv2/core/vsx_utils.hpp:365:30: note: candidate function
    VSX_FINLINE(vec_double2) vec_rsqrt(const vec_double2& a)
                             ^
1 warning and 4 errors generated.

The specific functions were added to altivec.h in LLVM's 1ff93618e58df210def48d26878c20a1b414d900, c3da07d216dd20fbdb7302fd085c0a59e189ae3d and 10cc5bcd868c433f9a781aef82178b04e98bd098.
2022-03-21 02:05:05 +00:00
Giles Payne
9ce0e51305 Objective-C wrapper header fix-ups to avoid clashes with system macros 2022-03-20 18:47:26 +09:00
Maksim Shabunin
0d16b5fc38 Fix libva dynamic loading 2022-03-15 19:08:20 +03:00
rogday
e16cb8b4a2
Merge pull request #21703 from rogday:transpose
Add n-dimensional transpose to core

* add n-dimensional transpose to core

* add performance test, write sequentially and address review comments
2022-03-14 13:10:04 +00:00
Vincent Rabaud
057c3da82a Allow Matx static function to work with Vec. 2022-03-04 14:06:20 +01:00
masa-iwm
1ae2320e09 bugfix convertFromD3D11Texture2D 2022-03-03 07:21:53 +09:00
Vadim Levin
ccebbbc0ac feature: submodule or a class scope for exported classes
All classes are registered in the scope that corresponds to C++
namespace or exported class.

Example:
`cv::ml::Boost` is exported as `cv.ml.Boost`
`cv::SimpleBlobDetector::Params` is exported as
`cv.SimpleBlobDetector.Params`

For backward compatibility all classes are registered in the global
module with their mangling name containing scope information.
Example:
`cv::ml::Boost` has `cv.ml_Boost` alias to `cv.ml.Boost` type
2022-03-02 14:30:52 +03:00
Tatsuro Shibamura
d354ad1c34
Merge pull request #21630 from shibayan:arm64-msvc-neon
* Added NEON support in builds for Windows on ARM

* Fixed `HAVE_CPU_NEON_SUPPORT` display broken during compiler test

* Fixed a build error prior to Visual Studio 2022
2022-02-26 17:35:03 +00:00
Vadim Levin
119d8b3aca
Merge pull request #21553 from VadimLevin:dev/vlevin/scope-for-classes-4x-port
4.x: submodule or a class scope for exported classes

* feature: submodule or a class scope for exported classes

All classes are registered in the scope that corresponds to C++
namespace or exported class.

Example:
`cv::ml::Boost` is exported as `cv.ml.Boost`
`cv::SimpleBlobDetector::Params` is exported as
`cv.SimpleBlobDetector.Params`

For backward compatibility all classes are registered in the global
module with their mangling name containing scope information.
Example:
`cv::ml::Boost` has `cv.ml_Boost` alias to `cv.ml.Boost` type

* refactor: remove redundant GAPI aliases

* fix: use explicit string literals in CVPY_TYPE macro

* fix: add handling for class aliases
2022-02-25 01:17:43 +03:00
Alexander Alekhin
5a86592e93 Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2022-02-19 21:04:35 +00:00
Yuriy Chernyshov
0898f372b1
Аix -Winvalid-noreturn under clang-cl 2022-02-18 17:57:46 +03:00
Sean McBride
5b23752205 Replaced incorrect double checked locking with a static
Thread Sanitizer identified an incorrect implementation of double checked locking.

Replaced it with a static, which therefore can only be created once.
2022-02-15 14:24:21 -05:00
Alexander Alekhin
8d88bb06b2 core(vsx): update vec_absd() workaround condition 2022-02-15 07:26:40 +03:00
Alexander Alekhin
19926e2979 Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2022-02-11 17:32:37 +00:00
Vincent Rabaud
fc28ba3156
Merge pull request #21594 from vrabaud:3.4_msan
* Fix harmless MSAN error.

This is similar to https://github.com/opencv/opencv/pull/21527
A macro is also created to simplify the code.

* Declare fallback only once.
2022-02-10 19:44:14 +03:00
Greg Fiumara
dae73938e8
Fix cv::FileStorage::Mode::Memory doxygen layout 2022-02-09 12:24:50 -05:00
cudawarped
f66a2ffa1e Fix GpuMat to correctly calculate dataend when using GpuMat::create().
Add output to createMat() to be used by locateROI test cases.
2022-02-02 14:25:46 +00:00
Alexander Alekhin
a351e05a17 Merge pull request #21538 from edman007:fixup-21536 2022-02-01 17:01:16 +00:00
Ed Martin
dc29632d4e Fallback to vaCreateImage + vaPutImage/vaGetImage when vaDeriveImage fails
Per intel docs for libva, when vaDeriveImage fails vaCreateImage +
  vaPutImage should be tried. This is important as mesa with AMD HW
  will always fail because the image is interlaced so a indirect
  method must be used to get the surface to/from and image

Fixes https://github.com/opencv/opencv/issues/21536
2022-01-31 17:12:37 -05:00
Alexander Alekhin
d573472a86 Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2022-01-31 12:53:45 +00:00
Vincent Rabaud
b5b52afd35
Merge pull request #21527 from vrabaud:3.4_msan
* Fix wrong MSAN errors.

Because Fortran is called in Lapack, MSAN does not think the memory
has been written even though it is the case.
MSAN does no support well cross-language memory analysis.

* Make a dedicated check.
2022-01-28 15:35:47 +00:00
Vadim Levin
d88730685e fix: submodules creation and registration
- Add special case handling when submodule has the same name as parent
- `PyDict_SetItemString` doesn't steal reference, so reference count
  should be explicitly decremented to transfer object life-time
  ownership
- Add sanity checks for module registration input
- Add Python 2 and Python 3 reference counting handling
2022-01-27 11:06:06 +03:00
Alexander Alekhin
83ce1de8e7 Merge pull request #21506 from alalek:core_fp_denormals 2022-01-26 08:52:27 +00:00
Alexander Alekhin
b1d484f827 core(parallel): propagate FP denormals mode 2022-01-26 05:19:02 +00:00
Alexander Alekhin
123519165d core: FP denormals hints support 2022-01-26 05:19:02 +00:00
pkubaj
5d9ea394ba
Fix VSX detection on FreeBSD
hwcap should actually be long.
2022-01-25 13:35:22 +00:00
Yuriy Chernyshov
d1b533d399 Disable -Wreturn-type-c-linkage under clang-cl
clang-cl defines both __clang__ and _MSC_VER, yet uses `#pragma GCC` to disable certain diagnostics.

At the time `-Wreturn-type-c-linkage` was reported by clang-cl.
This PR fixes this behavior by reordering defines.
2022-01-24 11:42:02 +03:00
Alexander Alekhin
3f2377017c Merge pull request #21497 from alalek:fix_build_gcc12_3.4 2022-01-23 14:00:55 +00:00
Alexander Alekhin
302d14adef build: fix GCC12 compilation 2022-01-22 11:48:44 +00:00
Vadim Levin
eca2d92791 fix: submodules creation and registration
- Add special case handling when submodule has the same name as parent
- `PyDict_SetItemString` doesn't steal reference, so reference count
  should be explicitly decremented to transfer object life-time
  ownership
- Add sanity checks for module registration input
2022-01-19 18:06:58 +03:00
Alexander Alekhin
5ba9a089e1 core(persistence): avoid NULL pointer dereference 2022-01-18 04:56:43 +00:00
Alexander Alekhin
aebb65e983 Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2022-01-12 13:26:10 +00:00
cudawarped
ecfbaa267d
Merge pull request #21374 from cudawarped:fix_cuda_event_flags
Allow cv::cuda::Event to accept combinations of flags
2022-01-11 23:57:25 +03:00
Vincent Rabaud
4db3a388dd Fix a potential UBSAN error.
We only use that value as uint64_t below anyway.
2022-01-11 12:01:47 +01:00
Christoph Rackwitz
f3e0479a8f kmeans: assertion "There can't be more clusters than elements" 2022-01-08 23:42:21 +01:00
Vincent Rabaud
bf5e09d5ab Remove unnecessary use of ref-capture in code example. 2022-01-05 13:42:55 +01:00
Suleyman TURKMEN
0e6a2c0491 fix legacy constants 2022-01-03 15:08:10 +03:00
Joe Howse
c2209ad5e4 Doc warnings about experimental UMatUsageFlags 2021-12-31 13:51:06 -04:00
Alexander Alekhin
92925e846d Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2021-12-29 15:22:13 +00:00
Alexander Alekhin
c5a86c22a4 core(ocl): add option to abort on OpenCL kernel build failure
- exceptions are catched by fallback CPU path
- OPENCV_OPENCL_ABORT_ON_BUILD_ERROR (disabled by default)
2021-12-29 00:04:45 +00:00
Alexander Alekhin
db172d1053 Merge tag '4.5.5' 2021-12-25 11:22:16 +00:00
Alexander Alekhin
dad26339a9 release: OpenCV 4.5.5 2021-12-25 03:53:27 +00:00
Rostislav Vasilikhin
3048188b5b
Merge pull request #21319 from savuor:backport_levmarqfromscratch
Warning fixes for quaternion headers

* warning fixes for quaternion headers

* a/T(x) => a * T(1/x)
2021-12-24 23:00:21 +00:00
Alexander Alekhin
217fea9667 Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2021-12-24 16:48:07 +00:00
Alexander Alekhin
523c3cd50b Merge tag '3.4.17' 2021-12-24 16:45:05 +00:00