Skip to content

Commit 047ad4f

Browse files
committed
Merge pull request opencv#10366 from alalek:ocl_fix_cvtcolor_read
2 parents ae8bb71 + 813ff37 commit 047ad4f

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

modules/imgproc/src/opencl/cvtcolor.cl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -877,7 +877,11 @@ __kernel void RGB(__global const uchar* srcptr, int src_step, int src_offset,
877877
{
878878
__global const DATA_TYPE * src = (__global const DATA_TYPE *)(srcptr + src_index);
879879
__global DATA_TYPE * dst = (__global DATA_TYPE *)(dstptr + dst_index);
880+
#if scn == 3
881+
DATA_TYPE_3 src_pix = vload3(0, src);
882+
#else
880883
DATA_TYPE_4 src_pix = vload4(0, src);
884+
#endif
881885

882886
#ifdef REVERSE
883887
dst[0] = src_pix.z;

0 commit comments

Comments
 (0)