mirror of
https://github.com/opencv/opencv.git
synced 2026-07-29 07:13:02 +04:00
df0c9d7950
dnn: optimize blobFromImages using NEON intrinsics on ARM64 #29316 - This PR optimizes the HWC-to-NCHW conversion in blobFromImages() by adding NEON implementation. - On x64, the MSVC compiler automatically vectorizes the existing scalar implementation, resulting in significantly better performance. - On Windows ARM64, MSVC does not auto-vectorize this stride-3 access pattern, leading to a noticeable performance gap compared to x64. - Added CV_NEON macro guard to ensure SIMD optimization is enabled on ARM64 architecture, leaving behavior on other platforms completely unchanged. **Performance Improvements** - This optimization significantly improves the performance of HWC-to-NCHW conversion on Windows ARM64. <img width="823" height="254" alt="image" src="https://github.com/user-attachments/assets/84b22deb-22da-4607-8009-3405c2529b80" /> - [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