1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-29 15:23:05 +04:00

Merge pull request #26061 from penghuiho:fix-pow-bug

Fixed the simd bugs of iPow8u and iPow16u #26061

Add the following cases in opencv_perf_core:

* OCL_PowFixture_iPow.iPow/0, where GetParam() = (640x480, 8UC1)
* OCL_PowFixture_iPow.iPow/2, where GetParam() = (640x480, 16UC1)

iPow8u and iPow16u failed to call to simd accelerating while executing.

Fix the bug by changing the input type of iPow_SIMD function.

### 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
This commit is contained in:
penghuiho
2024-08-23 22:12:19 +08:00
committed by GitHub
parent e5b871fa7e
commit f4c2e4f872
2 changed files with 20 additions and 2 deletions
+2 -2
View File
@@ -791,7 +791,7 @@ struct iPow_SIMD
#if (CV_SIMD || CV_SIMD_SCALABLE)
template <>
struct iPow_SIMD<uchar, int>
struct iPow_SIMD<uchar, unsigned>
{
int operator() ( const uchar * src, uchar * dst, int len, int power )
{
@@ -871,7 +871,7 @@ struct iPow_SIMD<schar, int>
};
template <>
struct iPow_SIMD<ushort, int>
struct iPow_SIMD<ushort, unsigned>
{
int operator() ( const ushort * src, ushort * dst, int len, int power)
{