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

Merge pull request #24893 from chacha21:cart_polar_inplace

Added in-place support for cartToPolar and polarToCart #24893

- a fused hal::cartToPolar[32|64]f() is used instead of sequential hal::magnitude[32|64]f/hal::fastAtan[32|64]f
- ipp_polarToCart is skipped for in-place processing (it seems not to support it correctly)

relates to #24891
### 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
- [X] 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.
- [ ] The feature is well documented and sample code can be built with the project CMake
This commit is contained in:
Pierre Chatelier
2024-03-26 13:38:17 +01:00
committed by GitHub
parent accf200408
commit 1a537ab98f
7 changed files with 402 additions and 42 deletions
+19 -1
View File
@@ -9,7 +9,25 @@
namespace cv { namespace hal {
///////////////////////////////////// ATAN2 ////////////////////////////////////
void cartToPolar32f(const float* x, const float* y, float* mag, float* angle, int len, bool angleInDegrees)
{
CV_INSTRUMENT_REGION();
CALL_HAL(cartToPolar32f, cv_hal_cartToPolar32f, x, y, mag, angle, len, angleInDegrees);
CV_CPU_DISPATCH(cartToPolar32f, (x, y, mag, angle, len, angleInDegrees),
CV_CPU_DISPATCH_MODES_ALL);
}
void cartToPolar64f(const double* x, const double* y, double* mag, double* angle, int len, bool angleInDegrees)
{
CV_INSTRUMENT_REGION();
CALL_HAL(cartToPolar64f, cv_hal_cartToPolar64f, x, y, mag, angle, len, angleInDegrees);
CV_CPU_DISPATCH(cartToPolar64f, (x, y, mag, angle, len, angleInDegrees),
CV_CPU_DISPATCH_MODES_ALL);
}
void fastAtan32f(const float *Y, const float *X, float *angle, int len, bool angleInDegrees )
{