CARVIEW |
Navigation Menu
-
-
Notifications
You must be signed in to change notification settings - Fork 56.2k
added in-place support for cartToPolar and polarToCart #24893
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
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 when in-place (it seems not to support it correctly)
This is not so easy, because in-place is expected by be faster than regular src->dst call. At least not slower. Current gaps are:
BTW, see also #7819 - this is my attempt but it was incomplete too. |
I don't think there is a risk of perf regression because
Interesting (currently on my host machine the test_arithm does not raise any error), do you think that it is related to the ReadOnly/WriteOnly/ReadWrite specification of kernel arguments that would let the compiler assume some |
I lack a test case where in-place would fail due to some run time implementations (as reported by a previosu comment) This proposal aims at expliciting that some buffers can be in/out, so that no optimization would trick the memory accesses
refactored CartPolar to test more cases this revealed a bug in the original implementation of polarToCart with implicit magnitude in 64F case
@opencv-alalek @mshabunin @vpisarev could you take a look? |
@vpisarev @opencv-alalek is it ready for merge? |
Added in-place support for cartToPolar and polarToCart opencv#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 opencv#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
Added in-place support for cartToPolar and polarToCart opencv#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 opencv#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
Added in-place support for cartToPolar and polarToCart opencv#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 opencv#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
relates to #24891
Pull Request Readiness Checklist
See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request
Patch to opencv_extra has the same branch name.