mirror of
https://github.com/opencv/opencv.git
synced 2026-07-29 07:13:02 +04:00
replaced GPU -> CUDA
This commit is contained in:
@@ -197,11 +197,11 @@ Ptr<FrameSource> cv::superres::createFrameSource_Camera(int deviceId)
|
||||
#endif // HAVE_OPENCV_HIGHGUI
|
||||
|
||||
//////////////////////////////////////////////////////
|
||||
// VideoFrameSource_GPU
|
||||
// VideoFrameSource_CUDA
|
||||
|
||||
#ifndef HAVE_OPENCV_CUDACODEC
|
||||
|
||||
Ptr<FrameSource> cv::superres::createFrameSource_Video_GPU(const String& fileName)
|
||||
Ptr<FrameSource> cv::superres::createFrameSource_Video_CUDA(const String& fileName)
|
||||
{
|
||||
(void) fileName;
|
||||
CV_Error(cv::Error::StsNotImplemented, "The called functionality is disabled for current build or platform");
|
||||
@@ -212,10 +212,10 @@ Ptr<FrameSource> cv::superres::createFrameSource_Video_GPU(const String& fileNam
|
||||
|
||||
namespace
|
||||
{
|
||||
class VideoFrameSource_GPU : public FrameSource
|
||||
class VideoFrameSource_CUDA : public FrameSource
|
||||
{
|
||||
public:
|
||||
VideoFrameSource_GPU(const String& fileName);
|
||||
VideoFrameSource_CUDA(const String& fileName);
|
||||
|
||||
void nextFrame(OutputArray frame);
|
||||
void reset();
|
||||
@@ -226,12 +226,12 @@ namespace
|
||||
GpuMat frame_;
|
||||
};
|
||||
|
||||
VideoFrameSource_GPU::VideoFrameSource_GPU(const String& fileName) : fileName_(fileName)
|
||||
VideoFrameSource_CUDA::VideoFrameSource_CUDA(const String& fileName) : fileName_(fileName)
|
||||
{
|
||||
reset();
|
||||
}
|
||||
|
||||
void VideoFrameSource_GPU::nextFrame(OutputArray _frame)
|
||||
void VideoFrameSource_CUDA::nextFrame(OutputArray _frame)
|
||||
{
|
||||
if (_frame.kind() == _InputArray::GPU_MAT)
|
||||
{
|
||||
@@ -249,13 +249,13 @@ namespace
|
||||
}
|
||||
}
|
||||
|
||||
void VideoFrameSource_GPU::reset()
|
||||
void VideoFrameSource_CUDA::reset()
|
||||
{
|
||||
reader_ = cudacodec::createVideoReader(fileName_);
|
||||
}
|
||||
}
|
||||
|
||||
Ptr<FrameSource> cv::superres::createFrameSource_Video_GPU(const String& fileName)
|
||||
Ptr<FrameSource> cv::superres::createFrameSource_Video_CUDA(const String& fileName)
|
||||
{
|
||||
return new VideoFrameSource(fileName);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user