Skip to content

Raise priority of HAL implementation for GaussianBlur#25334

Closed
asmorkalov wants to merge 1 commit intoopencv:4.xfrom
asmorkalov:as/GaussianBlur_HAL
Closed

Raise priority of HAL implementation for GaussianBlur#25334
asmorkalov wants to merge 1 commit intoopencv:4.xfrom
asmorkalov:as/GaussianBlur_HAL

Conversation

@asmorkalov
Copy link
Copy Markdown
Contributor

@asmorkalov asmorkalov commented Apr 4, 2024

Fixes #24850

Try to use CPU HAL for the cases, where OpenCL is not applicable as first option.

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 force-pushed the as/GaussianBlur_HAL branch from 587cb09 to 7612e17 Compare April 4, 2024 12:30
Copy link
Copy Markdown
Contributor

@opencv-alalek opencv-alalek left a comment

Choose a reason for hiding this comment

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

@vpisarev "Transparent API" with non-transparent conditions needs your comments.


static bool param_check_gaussian_blur_bitexact_kernels = utils::getConfigurationParameterBool("OPENCV_GAUSSIANBLUR_CHECK_BITEXACT_KERNELS", false);

if (!(useOpenCL && OpenCL_applicable) || !param_check_gaussian_blur_bitexact_kernels)
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.

param_check_gaussian_blur_bitexact_kernels

Wrong usage.

This is a CHECK for kernels with logging messages.

if(!(borderType & BORDER_ISOLATED))
src.locateROI( wsz, ofs );

CALL_HAL(gaussianBlur, cv_hal_gaussianBlur, src.ptr(), src.step, dst.ptr(), dst.step, src.cols, src.rows, sdepth, cn,
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.

Where was it previously?
Why is not removed from old location?

if(!(borderType & BORDER_ISOLATED))
src.locateROI( wsz, ofs );

CALL_HAL(gaussianBlur, cv_hal_gaussianBlur, src.ptr(), src.step, dst.ptr(), dst.step, src.cols, src.rows, sdepth, cn,
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.

This API is for pre-bitexact implementation.

Bitexact path should has own (new!) HAL API function.

(we don't change semantic existed API, we add new API with new requirements)

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.

gaussianBlur almost never call HAL on CPU

2 participants