Skip to content

Use HAL for cv::mean function too#26895

Merged
asmorkalov merged 1 commit intoopencv:4.xfrom
asmorkalov:as/mean_hal
Feb 12, 2025
Merged

Use HAL for cv::mean function too#26895
asmorkalov merged 1 commit intoopencv:4.xfrom
asmorkalov:as/mean_hal

Conversation

@asmorkalov
Copy link
Copy Markdown
Contributor

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


CV_IPP_RUN(IPP_VERSION_X100 >= 700, ipp_mean(src, mask, s), s)

if (src.isContinuous() && mask.isContinuous())
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Usually we put HAL call before IPP.

Copy link
Copy Markdown
Contributor

@mshabunin mshabunin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall looks good to me with two comments:

  • IPP is called before HAL, so we won't be able to override this function on x86_64 platforms (we can leave it this way if we are going to move IPP to HAL soon)
  • name of the macro can be discussed - CALL_HAL_RET_? CALL_HAL_RET_VA? Or is RET2 ok?

@asmorkalov
Copy link
Copy Markdown
Contributor Author

IPP will be covered in #26880.

@asmorkalov asmorkalov merged commit 8e65075 into opencv:4.x Feb 12, 2025
27 of 28 checks passed
@asmorkalov asmorkalov mentioned this pull request Feb 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants