mirror of
https://github.com/opencv/opencv.git
synced 2026-09-11 04:43:22 -05:00
core: vectorize masked norm/normDiff for remaining depths - #29815 ### Summary - The masked `cv::norm()` / `cv::norm(a, b)` kernels in `norm.simd.hpp` had SIMD specializations only for `uchar`, `ushort` and `float`. - `schar`, `short`, `int`, `double` and `uchar` L2 paths uses the scalar implementation. ### Changes - Added new vectorized implementations of MaskedNorm{Inf,L1,L2}_SIMD for schar, short, int, and double. - Added new vectorized implementation of MaskedNormL2_SIMD<uchar, int>. - Added new MaskedNormDiff{Inf,L1,L2}_SIMD implementations for double. - Added cn == 4 v_load_deinterleave paths to the uchar L1/L2 kernels. - Replaced the single f64 accumulator in MaskedNormL1_SIMD<float,double> with four independent ones, so the widening adds can overlap instead of each waiting on the previous. ### Performance Benchmarks <img width="715" height="709" alt="image" src="https://github.com/user-attachments/assets/46afea06-df98-4dd4-a346-dc8cd4a065c9" />