mirror of
https://github.com/opencv/opencv.git
synced 2026-11-17 14:58:10 -06:00
patchNaNs asserted CV_32F or CV_64F input, so 16-bit float arrays, which can hold NaN too, could not be patched. Add patchNaNs_16, the same bit test as the 32-bit kernel on 16-bit words, with the infinity pattern of each format (0x7c00 for CV_16F, 0x7f80 for CV_16BF). getPatchNanFunc now takes the depth. The OpenCL kernel only handles float and double, so other depths fall back to the CPU path.