Commit Graph

5632 Commits

Author SHA1 Message Date
Dmitry Kurtaev
a7bb17b092
Merge pull request #26399 from dkurt:dk/file_storage_new_data
int64 data type in FileStorage #26399

### Pull Request Readiness Checklist

resolves #23333

Proposed approach is not perfect in terms of complexity and potential bugs. Instead of changing `INT` raw size from `4` to `8`, we check int64 value can be fitted to int32 or not.

Collections such as cv::Mat rely on data type symbol.

This PR is addressed to 5.x branch first to cover `CV_64S` Mat. Later, it can be backported to 4.x

See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request

- [x] I agree to contribute to the project under Apache 2 License.
- [x] To the best of my knowledge, the proposed patch is not based on a code under GPL or another license that is incompatible with OpenCV
- [x] The PR is proposed to the proper branch
- [x] There is a reference to the original bug report and related work
- [x] There is accuracy test, performance test and test data in opencv_extra repository, if applicable
      Patch to opencv_extra has the same branch name.
- [x] The feature is well documented and sample code can be built with the project CMake
2024-11-08 08:27:59 +03:00
Alexander Smorkalov
03983549fc Merge branch 4.x 2024-11-06 08:20:12 +03:00
Dmitry Kurtaev
286f7524bb
Merge pull request #26420 from dkurt:fs_mat_0d_1d
Support 0d/1d Mat in FileStorage #26420

### Pull Request Readiness Checklist

See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request

- [x] I agree to contribute to the project under Apache 2 License.
- [x] To the best of my knowledge, the proposed patch is not based on a code under GPL or another license that is incompatible with OpenCV
- [x] The PR is proposed to the proper branch
- [x] There is a reference to the original bug report and related work
- [x] There is accuracy test, performance test and test data in opencv_extra repository, if applicable
      Patch to opencv_extra has the same branch name.
- [x] The feature is well documented and sample code can be built with the project CMake
2024-11-06 08:11:59 +03:00
Alexander Smorkalov
55105719dd
Merge pull request #26396 from hanliutong:rvv-fp16-m2
Use LMUL=2 in the RISC-V Vector (RVV) FP16 part. (5.x)
2024-11-02 13:30:31 +03:00
Vadim Pisarevsky
df06d2eac2
Merge pull request #26254 from vpisarev:extra_tests_for_reshape
Added extra tests for reshape #26254

Attempt to reproduce problems described in #25174. No success; everything works as expected. Probably, the function has been used improperly. Slightly modified the code of Mat::reshape() to provide better diagnostic.

- [x] I agree to contribute to the project under Apache 2 License.
- [x] To the best of my knowledge, the proposed patch is not based on a code under GPL or another license that is incompatible with OpenCV
- [x] The PR is proposed to the proper branch
- [x] There is a reference to the original bug report and related work
- [x] There is accuracy test, performance test and test data in opencv_extra repository, if applicable
      Patch to opencv_extra has the same branch name.
- [x] The feature is well documented and sample code can be built with the project CMake
2024-11-01 11:37:56 +03:00
Liutong HAN
a59a66a2c7 Use LMUL=2 in the RISC-V Vector (RVV) FP16 part. 2024-11-01 07:05:25 +00:00
Alexander Smorkalov
a95658f106
Merge pull request #26383 from mshabunin:fix-samples-cpp-17
build: raise min cmake version to 3.13 in other places
2024-10-31 09:34:28 +03:00
Maksim Shabunin
e44e3ab0a7 build: raise min cmake version to 3.13 in other places 2024-10-30 14:39:04 +03:00
Vadim Pisarevsky
299aa14c4b fixed typo in bfloat<=>float conversion test 2024-10-29 20:06:11 +03:00
Kumataro
3b01a4d4e9
Merge pull request #26373 from Kumataro:fix26372
doc: fix doxygen errors at Algorithm and QRCodeEncoder #26373

Close https://github.com/opencv/opencv/issues/26372

### Pull Request Readiness Checklist

See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request

- [x] I agree to contribute to the project under Apache 2 License.
- [x] To the best of my knowledge, the proposed patch is not based on a code under GPL or another license that is incompatible with OpenCV
- [x] The PR is proposed to the proper branch
- [x] There is a reference to the original bug report and related work
- [ ] There is accuracy test, performance test and test data in opencv_extra repository, if applicable
      Patch to opencv_extra has the same branch name.
- [ ] The feature is well documented and sample code can be built with the project CMake
2024-10-28 09:20:04 +03:00
Alexander Smorkalov
8a5ec4bf7b
Merge pull request #26287 from mshabunin:cpp-17
build: transition to C++17, minor changes in documentation
2024-10-26 19:59:48 +03:00
Wanli
29e712ed93
Merge pull request #26369 from WanliZhong:5x_fix_hfloat_vfunc
Fix hfloat conflicts of v_func in merging 4.x to 5.x #26369

This PR solves the conflicts in merging 4.x to 5.x https://github.com/opencv/opencv/pull/26358
1. Explicitly convert the inputs number for `v_setall_` to hfloat number
2. Loosens the threshold for `v_sincos` test. (related issue: https://github.com/opencv/opencv/issues/26362)
3. Remove the new but temp api `template <> inline v_float16x8 v_setall_(float v) { return v_setall_f16((hfloat)v); }`

### Pull Request Readiness Checklist

See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request

- [x] I agree to contribute to the project under Apache 2 License.
- [x] To the best of my knowledge, the proposed patch is not based on a code under GPL or another license that is incompatible with OpenCV
- [x] The PR is proposed to the proper branch
- [ ] There is a reference to the original bug report and related work
- [ ] There is accuracy test, performance test and test data in opencv_extra repository, if applicable
      Patch to opencv_extra has the same branch name.
- [ ] The feature is well documented and sample code can be built with the project CMake
2024-10-26 19:54:13 +03:00
Maksim Shabunin
52100328d8 WinRT/UWP build: fix some specific warnings 2024-10-25 22:32:44 +03:00
Maksim Shabunin
d223e796f5 build: transition to C++17, minor changes in documentation 2024-10-25 15:05:14 +03:00
Alexander Smorkalov
8e55659afe Merge branch 4.x 2024-10-24 15:10:43 +03:00
Liutong HAN
35571be570
Merge pull request #26318 from hanliutong:rvv-intrin-m2
Use LMUL=2 in the RISC-V Vector (RVV) backend of Universal Intrinsic. #26318

The modification of this patch involves the RVV backend of Universal Intrinsic, replacing `LMUL=1` with `LMUL=2`.

Now each Universal Intrinsic type actually corresponds to two RVV vector registers, and each Intrinsic function also operates two vector registers. Considering that algorithms written using Universal Intrinsic usually do not use the maximum number of registers, this can help the RVV backend utilize more register resources without modifying the algorithm implementation

This patch is generally beneficial in performance.

We compiled OpenCV with `Clang-19.1.1` and `GCC-14.2.0` , ran it on `CanMV-k230` and `Banana-Pi F3`. Then we have four scenarios on combinations of compilers and devices. In `opencv_perf_core`, there are 3363 cases, of which:
- 901 (26.8%) cases achieved more than `5%` performance improvement in all four scenarios, and the average speedup of these test cases (compared to scalar) increased from `3.35x` to `4.35x`
- 75 (2.2%) cases had more than `5%` performance loss in all four scenarios, indicating that these cases are better with `LMUL=1` instead of `LMUL=2`. This involves `Mat_Transform`, `hasNonZero`, `KMeans`, `meanStdDev`, `merge` and `norm2`. Among them, `Mat_Transform` only has performance degradation in a few cases (`8UC3`), and the actual execution time of `hasNonZero` is so short that it can be ignored. For `KMeans`, `meanStdDev`, `merge` and `norm2`, we should be able to use the HAL to optimize/restore their performance. (In fact, we have already done this for `merge`  #26216 )

### Pull Request Readiness Checklist

See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request

- [x] I agree to contribute to the project under Apache 2 License.
- [x] To the best of my knowledge, the proposed patch is not based on a code under GPL or another license that is incompatible with OpenCV
- [ ] The PR is proposed to the proper branch
- [ ] There is a reference to the original bug report and related work
- [ ] There is accuracy test, performance test and test data in opencv_extra repository, if applicable
      Patch to opencv_extra has the same branch name.
- [ ] The feature is well documented and sample code can be built with the project CMake
2024-10-24 10:08:43 +03:00
Alexander Smorkalov
9f0c3f5b2b
Merge pull request #26327 from asmorkalov:as/drop_convertFp16
Finally dropped convertFp16 function in favor of cv::Mat::convertTo() #26327 

Partially address https://github.com/opencv/opencv/issues/24909
Related PR to contrib: https://github.com/opencv/opencv_contrib/pull/3812

### Pull Request Readiness Checklist

See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request

- [x] I agree to contribute to the project under Apache 2 License.
- [x] To the best of my knowledge, the proposed patch is not based on a code under GPL or another license that is incompatible with OpenCV
- [x] The PR is proposed to the proper branch
- [x] There is a reference to the original bug report and related work
- [ ] There is accuracy test, performance test and test data in opencv_extra repository, if applicable
      Patch to opencv_extra has the same branch name.
- [ ] The feature is well documented and sample code can be built with the project CMake
2024-10-22 15:17:24 +03:00
Alexander Smorkalov
57ccbee25d
Merge pull request #26245 from cudawarped:cuda_update_to_npp_stream_ctx
cuda - update npp calls to use the new NppStreamContext API if available
2024-10-22 14:44:42 +03:00
Alexander Smorkalov
94d5ad09ff
Merge pull request #26284 from fzuuzf:enum_arithmetic_fixes_for_c++26
C++26 Deprecated Enum Arithmetic Conversion: Fix core/mat.inl.hpp
2024-10-21 15:47:53 +03:00
Alexander Smorkalov
e026a5ad8a
Merge pull request #26281 from kallaballa:clgl_device_discovery
Rewrote OpenCL-OpenGL-interop device discovery routine without extensions and with Apple support
2024-10-18 15:52:17 +03:00
Vadim Pisarevsky
6e3c5db1c6
Merge pull request #26333 from vpisarev:fix_26322
Fix #26322: construction of another Mat header for empty matrix #26333

The PR fixes #26322

- [x] I agree to contribute to the project under Apache 2 License.
- [x] To the best of my knowledge, the proposed patch is not based on a code under GPL or another license that is incompatible with OpenCV
- [x] The PR is proposed to the proper branch
- [x] There is a reference to the original bug report and related work
- [x] There is accuracy test, performance test and test data in opencv_extra repository, if applicable
      Patch to opencv_extra has the same branch name.
- [x] The feature is well documented and sample code can be built with the project CMake
2024-10-18 14:50:27 +03:00
Vadim Pisarevsky
2f35847960
Merge pull request #26321 from vpisarev:better_bfloat
2x more accurate float => bfloat conversion #26321

There is a magic trick to make float => bfloat conversion more accurate (_original reference needed, is it done this way in PyTorch?_). In simplified form it looks like:

```
uint16_t f2bf(float x) {
    union {
        unsigned u;
        float f;
    } u;
    u.f = x;
    // return (uint16_t)(u.u >> 16); <== the old method before this patch
    return (uint16_t)((u.u + 0x8000) >> 16);
} 
```

it works correctly for almost all valid floating-point values, positive, zero or negative, and even for some extreme cases, like `+/-inf`, `nan` etc. The addition of `0x8000` to integer representation of 32-bit float before retrieving the highest 16 bits reduces the rounding error by ~2x.

The slight problem with this improved method is that the numbers very close to or equal to `+/-FLT_MAX` are mistakenly converted to `+/-inf`, respectively.

This patch implements improved algorithm for `float => bfloat` conversion in scalar and vector form; it fixes the above-mentioned problem using some extra bit magic, i.e. 0x8000 is not added to very big (by absolute value) numbers:

```
// the actual implementation is more efficient,
// without conditions or floating-point operations, see the source code
return (uint16_t)(u.u + (fabsf(x) <= big_threshold ? 0x8000 : 0)) >> 16);
```

The corresponding test has been added as well and this is output from the test:

```
[----------] 1 test from Core_BFloat
[ RUN      ] Core_BFloat.convert
maxerr0 = 0.00774842, mean0 = 0.00190643, stddev0 = 0.00186063
maxerr1 = 0.00389057, mean1 = 0.000952614, stddev1 = 0.000931268
[       OK ] Core_BFloat.convert (7 ms)
```

Here `maxerr0, mean0, stddev0` are for the original method and `maxerr1, mean1, stddev1` are for the new method. As you can see, there is a significant improvement in accuracy.

**Note:**

_Actually, on ~32,000,000 random FP32 numbers with uniformly distributed sign, exponent and mantissa the new method is always at least as accurate as the old one._

The test also checks all the corner cases, where we see no degradation either vs the original method.

- [x] I agree to contribute to the project under Apache 2 License.
- [x] To the best of my knowledge, the proposed patch is not based on a code under GPL or another license that is incompatible with OpenCV
- [x] The PR is proposed to the proper branch
- [ ] There is a reference to the original bug report and related work
- [x] There is accuracy test, performance test and test data in opencv_extra repository, if applicable
      Patch to opencv_extra has the same branch name.
- [x] The feature is well documented and sample code can be built with the project CMake
2024-10-18 14:46:40 +03:00
Vadim Pisarevsky
3cd57ea09e
Merge pull request #26056 from vpisarev:new_dnn_engine
New dnn engine #26056

This is the 1st PR with the new engine; CI is green and PR is ready to be merged, I think.
Merge together with https://github.com/opencv/opencv_contrib/pull/3794

---

**Known limitations:**
* [solved] OpenVINO is temporarily disabled, but is probably easy to restore (it's not a deal breaker to merge this PR, I guess)
* The new engine does not support any backends nor any targets except for the default CPU implementation. But it's possible to choose the old engine when loading a model, then all the functionality is available.
* [Caffe patch is here: #26208] The new engine only supports ONNX. When a model is constructed manually or is loaded from a file of different format (.tf, .tflite, .caffe, .darknet), the old engine is used.
* Even in the case of ONNX some layers are not supported by the new engine, such as all quantized layers (including DequantizeLinear, QuantizeLinear, QLinearConv etc.), LSTM, GRU, .... It's planned, of course, to have full support for ONNX by OpenCV 5.0 gold release. When a loaded model contains unsupported layers, we switch to the old engine automatically  (at ONNX parsing time, not at `forward()` time).
* Some layers , e.g. Expat, are only partially supported by the new engine. In the case of unsupported flavours it switches to the old engine automatically (at ONNX parsing time, not at `forward()` time).
* 'Concat' graph optimization is disabled. The optimization eliminates Concat layer and instead makes the layers that generate tensors to be concatenated to write the outputs to the final destination. Of course, it's only possible when `axis=0` or `axis=N=1`. The optimization is not compatible with dynamic shapes since we need to know in advance where to store the tensors. Because some of the layer implementations have been modified to become more compatible with the new engine, the feature appears to be broken even when the old engine is used.
* Some `dnn::Net` API is not available with the new engine. Also, shape inference may return false if some of the output or intermediate tensors' shapes cannot be inferred without running the model. Probably this can be fixed by a dummy run of the model with zero inputs.
* Some overloads of `dnn::Net::getFLOPs()` and `dnn::Net::getMemoryConsumption()` are not exposed any longer in wrapper generators; but the most useful overloads are exposed (and checked by Java tests).
* [in progress] A few Einsum tests related to empty shapes have been disabled due to crashes in the tests and in Einsum implementations. The code and the tests need to be repaired.
* OpenCL implementation of Deconvolution is disabled. It's very bad and very slow anyway; need to be completely revised.
* Deconvolution3D test is now skipped, because it was only supported by CUDA and OpenVINO backends, both of which are not supported by the new engine.
* Some tests, such as FastNeuralStyle, checked that the in the case of CUDA backend there is no fallback to CPU. Currently all layers in the new engine are processed on CPU, so there are many fallbacks. The checks, therefore, have been temporarily disabled.

---

- [x] I agree to contribute to the project under Apache 2 License.
- [x] To the best of my knowledge, the proposed patch is not based on a code under GPL or another license that is incompatible with OpenCV
- [x] The PR is proposed to the proper branch
- [ ] There is a reference to the original bug report and related work
- [ ] There is accuracy test, performance test and test data in opencv_extra repository, if applicable
      Patch to opencv_extra has the same branch name.
- [ ] The feature is well documented and sample code can be built with the project CMake
2024-10-16 15:28:19 +03:00
Alexander Smorkalov
3c627b0a97
Merge pull request #26268 from mshabunin:cpp-array-test
C-API cleanup: rework ArrayTest to use new arrays only
2024-10-14 11:14:10 +03:00
Alexander Smorkalov
1909ac8650
Merge pull request #26212 from jamacias:feature/TickMeter-lasttime
Enhance cv::TickMeter to be able to get the last elapsed time
2024-10-14 07:56:24 +03:00
kallaballa
3edcf410b6 more guarding 2024-10-11 02:18:14 +02:00
kallaballa
4cbb96b396 use new instead of malloc and guard it 2024-10-10 15:14:58 +02:00
kallaballa
50f6d54f87 renaming 2024-10-10 14:48:49 +02:00
Vincent Rabaud
16ea1382f7 Fix sanitizer issue in countNonZero32f
In that function, the floats are cast to int to be compared to 0.
But a float can be -0 or +0, hence
define CHECK_NZ_FP(x) ((x)*2 != 0)
to remove the sign bit. Except that can trigger the sanitizer:
runtime error: signed integer overflow: -1082130432 * 2 cannot be represented in type 'int'
Doing everything in uint instead of int is properly defined by the
standard.
2024-10-10 13:35:49 +02:00
Wanli
687e37e6a8
Merge pull request #25892 from WanliZhong:v_sincos
Add support for v_sin and v_cos (Sine and Cosine) #25892

This PR aims to implement `v_sincos(v_float16 x)`, `v_sincos(v_float32 x)` and `v_sincos(v_float64 x)`. 
Merged after https://github.com/opencv/opencv/pull/25891 and https://github.com/opencv/opencv/pull/26023

**NOTE:** 
Also, the patch changes already added `v_exp`, `v_log` and `v_erf` to pass parameters by reference instead of by value, to match API of other universal intrinsics.

TODO:
- [x] double and half float precision
- [x] tests for them
- [x] doc to explain the implementation

### Pull Request Readiness Checklist

See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request

- [x] I agree to contribute to the project under Apache 2 License.
- [x] To the best of my knowledge, the proposed patch is not based on a code under GPL or another license that is incompatible with OpenCV
- [x] The PR is proposed to the proper branch
- [ ] There is a reference to the original bug report and related work
- [ ] There is accuracy test, performance test and test data in opencv_extra repository, if applicable
      Patch to opencv_extra has the same branch name.
- [ ] The feature is well documented and sample code can be built with the project CMake
2024-10-10 13:25:12 +03:00
Karsten Wiese
2a681bbb6b C++26 Deprecated Arithmetic Conversion: Fix core/mat.inl.hpp
Prefix enums with '+' to make clang c++26 add to them again.
2024-10-10 10:40:19 +02:00
kallaballa
63b5dee274 fixed bug: variable shadowing 2024-10-10 06:35:42 +02:00
kallaballa
8ba7389b21 properly size the devices array 2024-10-10 06:32:22 +02:00
kallaballa
885bbc643f renaming 2024-10-10 06:30:33 +02:00
kallaballa
dceeb47cd3 rewrote clgl device discovery 2024-10-10 00:02:56 +02:00
Maksim Shabunin
d0e410da93 C-API cleanup: rework ArrayTest to use new arrays only 2024-10-09 22:36:20 +03:00
Suleyman TURKMEN
e72efd0d32
Merge pull request #26260 from sturkmen72:upd_doc_4_x
Update Documentation #26260

### Pull Request Readiness Checklist

See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request

- [x] I agree to contribute to the project under Apache 2 License.
- [x] To the best of my knowledge, the proposed patch is not based on a code under GPL or another license that is incompatible with OpenCV
- [x] The PR is proposed to the proper branch
- [ ] There is a reference to the original bug report and related work
- [ ] There is accuracy test, performance test and test data in opencv_extra repository, if applicable
      Patch to opencv_extra has the same branch name.
- [ ] The feature is well documented and sample code can be built with the project CMake
2024-10-09 09:09:51 +03:00
george
cefde84a76
Merge pull request #25909 from gblikas:patch-1
Update intrin_wasm.hpp #25909

See https://github.com/microsoft/vcpkg/issues/33443 for some build context when using 

```vcpkg install opencv4:wasm32-emscripten```

`__EMSCRIPTEN_major__`, `__EMSCRIPTEN_minor__` and `__EMSCRIPTEN_tiny__` in `emsdk` >= 3.1.4 are in a header, as opposed to command line. 

We could potentially be more aggressive with how I'm checking this property; let me know if I should make the change. 

It should also be suggested that `-msimd128` is auto-included in the associated portfile for opencv, but that's a separate issue. Someone let me know if I should also make that change as well. 

Special thanks to https://github.com/youar for supporting this work; please inform if applying a copyright-header is appropriate attribution.

### Pull Request Readiness Checklist

See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request

- [x] I agree to contribute to the project under Apache 2 License.
- [x] To the best of my knowledge, the proposed patch is not based on a code under GPL or another license that is incompatible with OpenCV
- [x] The PR is proposed to the proper branch
- [x] There is a reference to the original bug report and related work
- [x] There is accuracy test, performance test and test data in opencv_extra repository, if applicable
      Patch to opencv_extra has the same branch name.
- [x] The feature is well documented and sample code can be built with the project CMake
2024-10-09 08:36:10 +03:00
Kumataro
40428d919d
Merge pull request #26259 from Kumataro:fix26258
core: C-API cleanup: RNG algorithms in core(4.x) #26259

- replace CV_RAND_UNI and NORMAL to cv::RNG::UNIFORM and cv::RNG::NORMAL.

### Pull Request Readiness Checklist

See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request

- [x] I agree to contribute to the project under Apache 2 License.
- [x] To the best of my knowledge, the proposed patch is not based on a code under GPL or another license that is incompatible with OpenCV
- [x] The PR is proposed to the proper branch
- [x] There is a reference to the original bug report and related work
- [x] There is accuracy test, performance test and test data in opencv_extra repository, if applicable
      Patch to opencv_extra has the same branch name.
- [x] The feature is well documented and sample code can be built with the project CMake
2024-10-08 15:55:00 +03:00
Alexander Smorkalov
26985f1043
Merge pull request #26255 from vpisarev:test_for_countnonzero_1d
added comprehensive test for countNonZero run on continuous and discontinuous 1D arrays
2024-10-07 17:11:24 +03:00
Vadim Pisarevsky
68a81888ec
Merge pull request #26256 from vpisarev:expanded_tests_for_norm
extended Norm tests to prove that cv::norm() already supports all the types.

cv::norm() already provides enough functionality; just extended tests to prove it. See #24887

- [x] I agree to contribute to the project under Apache 2 License.
- [x] To the best of my knowledge, the proposed patch is not based on a code under GPL or another license that is incompatible with OpenCV
- [x] The PR is proposed to the proper branch
- [x] There is a reference to the original bug report and related work
- [x] There is accuracy test, performance test and test data in opencv_extra repository, if applicable
      Patch to opencv_extra has the same branch name.
- [x] The feature is well documented and sample code can be built with the project CMake
2024-10-07 17:07:59 +03:00
Maksim Shabunin
73d68f3f49 RISC-V: fix build with RVV 0.7.1 2024-10-07 12:53:23 +03:00
Vadim Pisarevsky
254db60667 removed unnecessary check (checked many times in other tests) 2024-10-04 23:57:24 +03:00
Vadim Pisarevsky
56673d969a added comprehensive test for countNonZero run on continuous and dis-continuous 1D arrays 2024-10-04 23:54:01 +03:00
Alexander Smorkalov
b03dd764a1 Relax conditions to allow 0d reshape for UMat. 2024-10-04 16:32:59 +03:00
cudawarped
e375d5786b cuda - update npp calls to use the new NppStreamContext API if available 2024-10-03 15:13:04 +03:00
Alexander Smorkalov
ae1fb8c033
Merge pull request #26224 from mshabunin:cpp-videoio-backport
C-API cleanup: backport videoio changes from 5.x
2024-10-03 14:41:20 +03:00
Yuantao Feng
97681bdfce
Merge pull request #25984 from fengyuentau:imgproc/warpaffine_opt
imgproc: add optimized warpAffine kernels for 8U/16U/32F + C1/C3/C4 inputs #25984

Merge wtih https://github.com/opencv/opencv_extra/pull/1198.
Merge with https://github.com/opencv/opencv_contrib/pull/3787.


### Pull Request Readiness Checklist

See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request

- [x] I agree to contribute to the project under Apache 2 License.
- [x] To the best of my knowledge, the proposed patch is not based on a code under GPL or another license that is incompatible with OpenCV
- [x] The PR is proposed to the proper branch
- [x] There is a reference to the original bug report and related work
- [x] There is accuracy test, performance test and test data in opencv_extra repository, if applicable
      Patch to opencv_extra has the same branch name.
- [x] The feature is well documented and sample code can be built with the project CMake
2024-10-03 14:01:36 +03:00
Wanli
783fe72756
Resolve Compilation Error for v_func Function in SIMD Emulator (#25891)
* use 2 parms for now to identify the error

* Revert "use 2 parms for now to identify the error"

This reverts commit 86faf993a7.

* replace += with =

* add v_log ref

* refactor intrin_math code

* Add include guard to `intrin_math.hpp` to prevent multiple inclusions

* rename VX to V; make fp64 impl in neon be optional

* add v_setall, v_setzero for all backends; rewrite the intrin_math

* fix error on rvv_scalable

* let v_erf use v_exp_default_32f function

* 1. replaced 'v_setzero(VecType dummy)' with 'v_setzero_<VecType>()'
2. replaced 'v_setall(LaneType x, VecType dummy)' with 'v_setall_<VecType>(LaneType x)'
3. added tests for the new v_setzero_<> and v_setall_<>.

* gcc does not seem to like static_assert in functions even when they are not used

* trying to fix compile errors in Debug mode on Linux

---------

Co-authored-by: Vadim Pisarevsky <vadim.pisarevsky@gmail.com>
2024-10-02 21:28:48 +03:00
Maksim Shabunin
305b57e622 C-API cleanup: backport videoio changes from 5.x 2024-10-01 17:06:08 +03:00