mirror of
https://github.com/opencv/opencv.git
synced 2026-07-29 23:33:05 +04:00
ocl: fix Canny for Intel devices
There is an issue with processing of abs(short) function for negative argument. Affected OpenCL devices: - iGPU: Intel(R) HD Graphics 520 (OpenCL 2.0 ) - CPU: Intel(R) Core(TM) i5-6300U CPU @ 2.40GHz (OpenCL 2.0 (Build 10094))
This commit is contained in:
@@ -260,7 +260,7 @@ __kernel void stage1_with_sobel(__global const uchar *src, int src_step, int src
|
||||
#ifdef L2GRAD
|
||||
#define dist(x, y) ((int)(x) * (x) + (int)(y) * (y))
|
||||
#else
|
||||
#define dist(x, y) (abs(x) + abs(y))
|
||||
#define dist(x, y) (abs((int)(x)) + abs((int)(y)))
|
||||
#endif
|
||||
|
||||
__constant int prev[4][2] = {
|
||||
|
||||
Reference in New Issue
Block a user