Skip to content

HAL added for absdiff(array, scalar) + related fixes#26459

Merged
asmorkalov merged 5 commits intoopencv:4.xfrom
savuor:rv/hal_absdiff_scalar
Nov 19, 2024
Merged

HAL added for absdiff(array, scalar) + related fixes#26459
asmorkalov merged 5 commits intoopencv:4.xfrom
savuor:rv/hal_absdiff_scalar

Conversation

@savuor
Copy link
Copy Markdown
Contributor

@savuor savuor commented Nov 13, 2024

This PR changes

  • HAL for absdiff when one of arguments is a scalar, including multichannel arrays and scalars
  • several channels support for HAL addScalar
  • proper data type check for addScalar when one of arguments is a scalar

Pull Request Readiness Checklist

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

  • I agree to contribute to the project under Apache 2 License.
  • 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

@asmorkalov asmorkalov requested a review from vpisarev November 14, 2024 05:10
@asmorkalov asmorkalov added this to the 4.11.0 milestone Nov 14, 2024
@asmorkalov
Copy link
Copy Markdown
Contributor

 /home/ci/opencv/modules/core/src/arithm.cpp:964:22: warning: 'sdepth' may be used uninitialized in this function [-Wmaybe-uninitialized]

/home/ci/opencv/modules/core/src/arithm.cpp:1094:31: warning: 'sdepth' may be used uninitialized in this function [-Wmaybe-uninitialized]

@savuor
Copy link
Copy Markdown
Contributor Author

savuor commented Nov 15, 2024

@asmorkalov I've changed output type from 32s to 32u:

  • the actual value range of absdiff(32s, 32s) is 32u
  • will be useful for future support in 5.x
    Please check it

@vpisarev vpisarev self-requested a review November 19, 2024 07:23
@asmorkalov asmorkalov merged commit 64d3111 into opencv:4.x Nov 19, 2024
@savuor savuor deleted the rv/hal_absdiff_scalar branch November 19, 2024 13:49
@asmorkalov asmorkalov mentioned this pull request Nov 21, 2024
thewoz pushed a commit to CobbsLab/OPENCV that referenced this pull request Feb 13, 2025
HAL added for absdiff(array, scalar) + related fixes opencv#26459

### This PR changes
* HAL for `absdiff` when one of arguments is a scalar, including multichannel arrays and scalars
* several channels support for HAL `addScalar`
* proper data type check for `addScalar` when one of arguments is a scalar

### 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.
- [x] The feature is well documented and sample code can be built with the project CMake
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants