Files
opencv-MIRROR/modules/core/perf
Vladimir Iglovikov 5608a3b4ae core: accelerate interleaved mixChannels permutations 🤖🤖🤖 (#30883)
cv::mixChannels copies each channel pair separately. This patch processes full permutations of a single interleaved matrix into a disjoint output in one pass over pixel blocks.

Use universal SIMD for 2–4 channels with 1-, 2-, or 4-byte elements.
Use dispatched byte shuffles for 5–16 channels on x86 and for 5–8 and 13–16 on AArch64. Start at 1,024 pixels and require at least 16 pixels per iterator plane. The NEON byte-shuffle code requires a 64-bit Arm target. ARMv7 uses the pairwise fallback for these wide byte maps. Preparing a shuffle costs more than it saves on smaller inputs. The AArch64 route for 9–12 channels regressed in the 512 × 512 tests.
Traverse pixels directly for CV_32F, CV_32S, and CV_32U with at least 32 channels and 65,536 pixels. This keeps reads local to each pixel and copies the 32-bit values without conversion. The size threshold avoids the slowdown seen on smaller wide matrices.
Overlap checks use the actual byte ranges of contiguous views and parent bounds for strided views. Partial maps and views that may overlap use the existing pairwise copy order. Identity mappings copy each iterator plane with a size_t byte count.
2026-12-02 15:28:29 +05:30
..
2018-02-03 19:39:47 +00:00
2025-06-10 10:16:50 +03:00
2018-02-03 19:39:47 +00:00
2018-02-03 19:39:47 +00:00
2018-02-03 19:39:47 +00:00
2019-02-27 18:07:45 +03:00
2018-02-03 19:39:47 +00:00
2018-02-03 19:39:47 +00:00
2018-02-03 19:39:47 +00:00
2018-02-03 19:39:47 +00:00