mirror of
https://github.com/opencv/opencv.git
synced 2024-11-29 13:47:32 +08:00
Merge pull request #8000 from mshabunin:fix-opencl-clahe
This commit is contained in:
commit
5b363df2ae
@ -186,21 +186,13 @@ __kernel void calcLut(__global __const uchar * src, const int srcStep,
|
||||
#else
|
||||
clipped = smem[0];
|
||||
#endif
|
||||
|
||||
// broadcast evaluated value
|
||||
|
||||
__local int totalClipped;
|
||||
|
||||
if (tid == 0)
|
||||
totalClipped = clipped;
|
||||
barrier(CLK_LOCAL_MEM_FENCE);
|
||||
|
||||
// redistribute clipped samples evenly
|
||||
|
||||
int redistBatch = totalClipped / 256;
|
||||
int redistBatch = clipped / 256;
|
||||
tHistVal += redistBatch;
|
||||
|
||||
int residual = totalClipped - redistBatch * 256;
|
||||
int residual = clipped - redistBatch * 256;
|
||||
int rStep = 256 / residual;
|
||||
if (rStep < 1)
|
||||
rStep = 1;
|
||||
|
Loading…
Reference in New Issue
Block a user