Commit 0d646490 authored by ltqusst's avatar ltqusst Committed by Li

Fix #10557

Fix overflow bugs in conversion from NV12 VA-surface/D3D11texture2D to OpenCL UMat
parent 6ffc4876
...@@ -92,9 +92,9 @@ void YUV2BGR_NV12_8u( ...@@ -92,9 +92,9 @@ void YUV2BGR_NV12_8u(
int x = get_global_id(0); int x = get_global_id(0);
int y = get_global_id(1); 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* pDstRow1 = pBGR + mad24(y, bgrStep, mad24(x, NCHANNELS, 0));
__global uchar* pDstRow2 = pDstRow1 + bgrStep; __global uchar* pDstRow2 = pDstRow1 + bgrStep;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment