mirror of
https://github.com/opencv/opencv.git
synced 2026-11-23 17:57:56 -06:00
core : add NEON intrinsics support for norm_mask function #28610 - This PR adds NEON intrinsics-based implementations for masked norm operations in norm.simd.hpp for ARM64 architecture. - The optimized implementation uses ARM NEON intrinsics to accelerate masked norm computations (Infinity norm, L1 norm, and L2 norm) used by the norm function when a mask is provided. - In the x64 architecture, masked norm operations benefit from IPP-based optimized implementations. However, on ARM64, the execution falls back to scalar implementations, which results in lower performance. - To achieve performance parity with x64, NEON-based SIMD implementations have been added for ARM64. - Additionally, scalar loop unrolling optimizations have been added for non-masked norm operations. - After introducing these changes, masked norm operations showed significant performance improvements on ARM64 platforms, particularly for single-channel (cn=1) operations where NEON intrinsics provide the greatest benefit. <img width="952" height="822" alt="image" src="https://github.com/user-attachments/assets/12d35f93-a316-4520-9d9c-12ce6b371ddb" /> - [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