|
|
|
@ -680,6 +680,7 @@ void cv::gpu::absdiff(const GpuMat& src1, const GpuMat& src2, GpuMat& dst, Strea |
|
|
|
|
|
|
|
|
|
bool aligned = isAligned(src1.data, 16) && isAligned(src2.data, 16) && isAligned(dst.data, 16); |
|
|
|
|
|
|
|
|
|
#if CUDART_VERSION == 4000 |
|
|
|
|
if (aligned && src1.depth() == CV_8U && (src1.cols * src1.channels()) % 4 == 0) |
|
|
|
|
{ |
|
|
|
|
NppStreamHandler h(stream); |
|
|
|
@ -692,7 +693,10 @@ void cv::gpu::absdiff(const GpuMat& src1, const GpuMat& src2, GpuMat& dst, Strea |
|
|
|
|
if (stream == 0) |
|
|
|
|
cudaSafeCall( cudaDeviceSynchronize() ); |
|
|
|
|
} |
|
|
|
|
else if (aligned && src1.depth() == CV_8U) |
|
|
|
|
else
|
|
|
|
|
#endif |
|
|
|
|
{ |
|
|
|
|
if (aligned && src1.depth() == CV_8U) |
|
|
|
|
{ |
|
|
|
|
NppStreamHandler h(stream); |
|
|
|
|
|
|
|
|
@ -702,6 +706,7 @@ void cv::gpu::absdiff(const GpuMat& src1, const GpuMat& src2, GpuMat& dst, Strea |
|
|
|
|
if (stream == 0) |
|
|
|
|
cudaSafeCall( cudaDeviceSynchronize() ); |
|
|
|
|
} |
|
|
|
|
#if CUDART_VERSION == 4000 |
|
|
|
|
else if (aligned && src1.depth() == CV_32S) |
|
|
|
|
{ |
|
|
|
|
NppStreamHandler h(stream); |
|
|
|
@ -712,6 +717,7 @@ void cv::gpu::absdiff(const GpuMat& src1, const GpuMat& src2, GpuMat& dst, Strea |
|
|
|
|
if (stream == 0) |
|
|
|
|
cudaSafeCall( cudaDeviceSynchronize() ); |
|
|
|
|
} |
|
|
|
|
#endif |
|
|
|
|
else if (aligned && src1.depth() == CV_32F) |
|
|
|
|
{ |
|
|
|
|
NppStreamHandler h(stream); |
|
|
|
@ -729,6 +735,7 @@ void cv::gpu::absdiff(const GpuMat& src1, const GpuMat& src2, GpuMat& dst, Strea |
|
|
|
|
|
|
|
|
|
func(src1.reshape(1), src2.reshape(1), dst.reshape(1), stream); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void cv::gpu::absdiff(const GpuMat& src1, const Scalar& src2, GpuMat& dst, Stream& s) |
|
|
|
|