1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-21 19:33:03 +04:00

Merge pull request #28664 from pratham-mcw:armpl_dft_opt

Add ARMPL support for DFT Function #28664

- This PR introduces hal/armpl/ with implementation of 1D, 2D DFT and DCT routines using ARM Performance Libraries as a custom HAL replacement for OpenCV's DFT & DCT Function.
- ArmPL MSI package is automatically downloaded and extracted via CMake when building on Windows ARM64, with a WITH_ARMPL option that defaults to ON for that platform.
- Forward and inverse real DFT calls in dxt.cpp are routed through ArmPL when available, with scaling applied only when needed.
- Test error thresholds in test_dxt.cpp are relaxed (from 1e-5 to 2e-4 for float ) to account for numerical differences between ArmPL and OpenCV's reference DFT results.

**Performance Benchmarks :**
<img width="993" height="835" alt="image" src="https://github.com/user-attachments/assets/76def647-6d20-4bce-8bc9-7363e723669f" />

- [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
This commit is contained in:
Pratham Kumar
2026-05-14 13:26:21 +05:30
committed by GitHub
parent 357ad24262
commit eadaab5fbb
9 changed files with 3176 additions and 1 deletions
+15
View File
@@ -38,6 +38,21 @@ if(WITH_IPP)
endif()
endif()
if(WITH_ARMPL)
include("${OpenCV_SOURCE_DIR}/cmake/OpenCVFindARMPL.cmake")
if(HAVE_ARMPL)
message(STATUS "Using ARM Performance Libraries")
ocv_include_directories(${ARMPL_INCLUDE_DIRS})
list(APPEND OPENCV_LINKER_LIBS ${ARMPL_LIBRARIES})
add_compile_definitions(HAVE_ARMPL)
if(WITH_OPENMP AND OpenMP_CXX_FOUND)
list(APPEND OPENCV_LINKER_LIBS OpenMP::OpenMP_CXX)
endif()
else()
message(STATUS "ARM Performance Libraries: Not found or not available")
endif()
endif()
# --- CUDA ---
if(WITH_CUDA)
if(ENABLE_CUDA_FIRST_CLASS_LANGUAGE)