1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-30 15:53:03 +04:00

Merge pull request #29413 from amd:fast_basic_op

core: Fix mul32f and addWeighted32f to use native f32 SIMD paths #29413

OpenCV Extra: https://github.com/opencv/opencv_extra/pull/1388

- add 32FC1 coverage to addWeighted benchmark
- avoid intermediate double for f32 variants of scaled multiply and addWeighted.
- Relax AddWeighted 32F test tolerance to match f32 FMA semantics.

### 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.
- [x] The feature is well documented and sample code can be built with the project CMake
This commit is contained in:
Madan mohan Manokar
2026-07-02 15:28:39 +05:30
committed by GitHub
parent 9460e30793
commit e6d0c0340b
3 changed files with 11 additions and 4 deletions
+4
View File
@@ -185,6 +185,10 @@ struct AddWeightedOp : public BaseAddOp
int dtype = (flags & MIXED_TYPE) ? dst.type() : -1;
cv::addWeighted(src[0], alpha, src[1], beta, gamma[0], dst, dtype);
}
double getMaxErr(int depth)
{
return depth < CV_32F ? 1 : depth == CV_32F ? 1e-4 : 1e-12;
}
};
struct MulOp : public BaseElemWiseOp