Fix #10557
Fix overflow bugs in conversion from NV12 VA-surface/D3D11texture2D to OpenCL UMat
This commit is contained in:
parent
6ffc48769a
commit
0d646490f5
@ -92,9 +92,9 @@ void YUV2BGR_NV12_8u(
|
||||
int x = get_global_id(0);
|
||||
int y = get_global_id(1);
|
||||
|
||||
if (x < cols)
|
||||
if (x + 1 < cols)
|
||||
{
|
||||
if (y < rows)
|
||||
if (y + 1 < rows)
|
||||
{
|
||||
__global uchar* pDstRow1 = pBGR + mad24(y, bgrStep, mad24(x, NCHANNELS, 0));
|
||||
__global uchar* pDstRow2 = pDstRow1 + bgrStep;
|
||||
@ -204,4 +204,4 @@ void BGR2YUV_NV12_8u(
|
||||
write_imagef(imgUV, (int2)((x/2), (y/2)), UV);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user