提交 9aa5ab75 编写于 作者: C cudawarped

cv::cuda: Replace all instances of texture references/objects with texture...

cv::cuda: Replace all instances of texture references/objects with texture objects using the existing updated cv::cudev::Texture class.
Fixes bugs in cv::cuda::demosaicing, cv::cuda::resize and cv::cuda::HoughSegmentDetector.
上级 9f201a8e
......@@ -98,6 +98,12 @@ namespace cv { namespace cuda
return (total + grain - 1) / grain;
}
#if (CUDART_VERSION >= 12000)
template<class T> inline void bindTexture(const textureReference* tex, const PtrStepSz<T>& img) { CV_Error(cv::Error::GpuNotSupported, "Function removed in CUDA SDK 12"); }
template<class T> inline void createTextureObjectPitch2D(cudaTextureObject_t* tex, PtrStepSz<T>& img, const cudaTextureDesc& texDesc) {
CV_Error(cv::Error::GpuNotSupported, "Function removed in CUDA SDK 12"); }
#else
//TODO: remove from OpenCV 5.x
template<class T> inline void bindTexture(const textureReference* tex, const PtrStepSz<T>& img)
{
cudaChannelFormatDesc desc = cudaCreateChannelDesc<T>();
......@@ -118,6 +124,7 @@ namespace cv { namespace cuda
cudaSafeCall( cudaCreateTextureObject(tex, &resDesc, &texDesc, NULL) );
}
}
#endif
}}
//! @endcond
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册