Make sure to not access outside normDiffTabMake sure to not access outside normDiffTab #27321
If the norm is outside the array (e.g. Hamming), memory is read outside of the array, which does not matter because the invalid pointer is not used oustide of the function (e.g. the Hamming path is taken) but it triggers the sanitizer.
### 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
Move IPP norm and normDiff to HAL #27128
Continues https://github.com/opencv/opencv/pull/26880
### 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
core: vectorize normDiff with universal intrinsics #27042
Merge with https://github.com/opencv/opencv_extra/pull/1242.
Performance results on Desktop Intel i7-12700K, Apple M2, Jetson Orin and SpaceMIT K1:
[perf-normDiff.zip](https://github.com/user-attachments/files/19178689/perf-normDiff.zip)
### 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
- [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.
- [ ] The feature is well documented and sample code can be built with the project CMake
core: vectorize cv::normalize / cv::norm #26885
Checklist:
| | normInf | normL1 | normL2 |
| ---- | ------- | ------ | ------ |
| bool | - | - | - |
| 8u | √ | √ | √ |
| 8s | √ | √ | √ |
| 16u | √ | √ | √ |
| 16s | √ | √ | √ |
| 16f | - | - | - |
| 16bf | - | - | - |
| 32u | - | - | - |
| 32s | √ | √ | √ |
| 32f | √ | √ | √ |
| 64u | - | - | - |
| 64s | - | - | - |
| 64f | √ | √ | √ |
*: Vectorization of data type bool, 16f, 16bf, 32u, 64u and 64s needs to be done on 5.x.
### 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
- [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.
- [ ] The feature is well documented and sample code can be built with the project CMake