1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-31 08:13:04 +04:00

Merge remote-tracking branch 'upstream/3.4' into merge-3.4

This commit is contained in:
Alexander Alekhin
2018-09-10 00:04:29 +03:00
107 changed files with 492 additions and 485 deletions
+1 -1
View File
@@ -2502,7 +2502,7 @@ void absdiff64f( const double* src1, size_t step1,
#define CALL_IPP_UN(fun) \
CV_IPP_CHECK() \
{ \
fixSteps(width, height, sizeof(dst[0]), step1, step2, step); (void)src2; \
fixSteps(width, height, sizeof(dst[0]), step1, step2, step); CV_UNUSED(src2); \
if (0 <= CV_INSTRUMENT_FUN_IPP(fun, src1, (int)step1, dst, (int)step, ippiSize(width, height))) \
{ \
CV_IMPL_ADD(CV_IMPL_IPP); \
+1 -1
View File
@@ -19,7 +19,7 @@ public:
virtual size_t getReservedSize() const CV_OVERRIDE { return (size_t)-1; }
virtual size_t getMaxReservedSize() const CV_OVERRIDE { return (size_t)-1; }
virtual void setMaxReservedSize(size_t size) CV_OVERRIDE { (void)size; }
virtual void setMaxReservedSize(size_t size) CV_OVERRIDE { CV_UNUSED(size); }
virtual void freeAllReservedBuffers() CV_OVERRIDE { }
};
+1 -1
View File
@@ -76,7 +76,7 @@ namespace
}
__device__ __host__ void deallocate(uchar* ptr, size_t numBytes) CV_OVERRIDE
{
(void)numBytes;
CV_UNUSED(numBytes);
#ifndef __CUDA_ARCH__
CV_CUDEV_SAFE_CALL(cudaFree(ptr));
#endif
+39 -39
View File
@@ -345,8 +345,8 @@ void cv::cuda::ensureSizeIsEnough(int rows, int cols, int type, OutputArray arr)
GpuMat cv::cuda::getInputMat(InputArray _src, Stream& stream)
{
#ifndef HAVE_CUDA
(void) _src;
(void) stream;
CV_UNUSED(_src);
CV_UNUSED(stream);
throw_no_cuda();
#else
GpuMat src;
@@ -367,11 +367,11 @@ GpuMat cv::cuda::getInputMat(InputArray _src, Stream& stream)
GpuMat cv::cuda::getOutputMat(OutputArray _dst, int rows, int cols, int type, Stream& stream)
{
#ifndef HAVE_CUDA
(void) _dst;
(void) rows;
(void) cols;
(void) type;
(void) stream;
CV_UNUSED(_dst);
CV_UNUSED(rows);
CV_UNUSED(cols);
CV_UNUSED(type);
CV_UNUSED(stream);
throw_no_cuda();
#else
GpuMat dst;
@@ -392,9 +392,9 @@ GpuMat cv::cuda::getOutputMat(OutputArray _dst, int rows, int cols, int type, St
void cv::cuda::syncOutput(const GpuMat& dst, OutputArray _dst, Stream& stream)
{
#ifndef HAVE_CUDA
(void) dst;
(void) _dst;
(void) stream;
CV_UNUSED(dst);
CV_UNUSED(_dst);
CV_UNUSED(stream);
throw_no_cuda();
#else
if (_dst.kind() != _InputArray::CUDA_GPU_MAT)
@@ -416,15 +416,15 @@ GpuMat::Allocator* cv::cuda::GpuMat::defaultAllocator()
void cv::cuda::GpuMat::setDefaultAllocator(Allocator* allocator)
{
(void) allocator;
CV_UNUSED(allocator);
throw_no_cuda();
}
void cv::cuda::GpuMat::create(int _rows, int _cols, int _type)
{
(void) _rows;
(void) _cols;
(void) _type;
CV_UNUSED(_rows);
CV_UNUSED(_cols);
CV_UNUSED(_type);
throw_no_cuda();
}
@@ -434,81 +434,81 @@ void cv::cuda::GpuMat::release()
void cv::cuda::GpuMat::upload(InputArray arr)
{
(void) arr;
CV_UNUSED(arr);
throw_no_cuda();
}
void cv::cuda::GpuMat::upload(InputArray arr, Stream& _stream)
{
(void) arr;
(void) _stream;
CV_UNUSED(arr);
CV_UNUSED(_stream);
throw_no_cuda();
}
void cv::cuda::GpuMat::download(OutputArray _dst) const
{
(void) _dst;
CV_UNUSED(_dst);
throw_no_cuda();
}
void cv::cuda::GpuMat::download(OutputArray _dst, Stream& _stream) const
{
(void) _dst;
(void) _stream;
CV_UNUSED(_dst);
CV_UNUSED(_stream);
throw_no_cuda();
}
void cv::cuda::GpuMat::copyTo(OutputArray _dst) const
{
(void) _dst;
CV_UNUSED(_dst);
throw_no_cuda();
}
void cv::cuda::GpuMat::copyTo(OutputArray _dst, Stream& _stream) const
{
(void) _dst;
(void) _stream;
CV_UNUSED(_dst);
CV_UNUSED(_stream);
throw_no_cuda();
}
void cv::cuda::GpuMat::copyTo(OutputArray _dst, InputArray _mask, Stream& _stream) const
{
(void) _dst;
(void) _mask;
(void) _stream;
CV_UNUSED(_dst);
CV_UNUSED(_mask);
CV_UNUSED(_stream);
throw_no_cuda();
}
GpuMat& cv::cuda::GpuMat::setTo(Scalar s, Stream& _stream)
{
(void) s;
(void) _stream;
CV_UNUSED(s);
CV_UNUSED(_stream);
throw_no_cuda();
}
GpuMat& cv::cuda::GpuMat::setTo(Scalar s, InputArray _mask, Stream& _stream)
{
(void) s;
(void) _mask;
(void) _stream;
CV_UNUSED(s);
CV_UNUSED(_mask);
CV_UNUSED(_stream);
throw_no_cuda();
}
void cv::cuda::GpuMat::convertTo(OutputArray _dst, int rtype, Stream& _stream) const
{
(void) _dst;
(void) rtype;
(void) _stream;
CV_UNUSED(_dst);
CV_UNUSED(rtype);
CV_UNUSED(_stream);
throw_no_cuda();
}
void cv::cuda::GpuMat::convertTo(OutputArray _dst, int rtype, double alpha, double beta, Stream& _stream) const
{
(void) _dst;
(void) rtype;
(void) alpha;
(void) beta;
(void) _stream;
CV_UNUSED(_dst);
CV_UNUSED(rtype);
CV_UNUSED(alpha);
CV_UNUSED(beta);
CV_UNUSED(_stream);
throw_no_cuda();
}
+6 -6
View File
@@ -136,7 +136,7 @@ private:
MatAllocator* cv::cuda::HostMem::getAllocator(AllocType alloc_type)
{
#ifndef HAVE_CUDA
(void) alloc_type;
CV_UNUSED(alloc_type);
throw_no_cuda();
#else
static std::map<unsigned int, Ptr<MatAllocator> > allocators;
@@ -178,9 +178,9 @@ namespace
void cv::cuda::HostMem::create(int rows_, int cols_, int type_)
{
#ifndef HAVE_CUDA
(void) rows_;
(void) cols_;
(void) type_;
CV_UNUSED(rows_);
CV_UNUSED(cols_);
CV_UNUSED(type_);
throw_no_cuda();
#else
if (alloc_type == SHARED)
@@ -317,7 +317,7 @@ GpuMat cv::cuda::HostMem::createGpuMatHeader() const
void cv::cuda::registerPageLocked(Mat& m)
{
#ifndef HAVE_CUDA
(void) m;
CV_UNUSED(m);
throw_no_cuda();
#else
CV_Assert( m.isContinuous() );
@@ -328,7 +328,7 @@ void cv::cuda::registerPageLocked(Mat& m)
void cv::cuda::unregisterPageLocked(Mat& m)
{
#ifndef HAVE_CUDA
(void) m;
CV_UNUSED(m);
#else
cudaSafeCall( cudaHostUnregister(m.data) );
#endif
+19 -19
View File
@@ -67,7 +67,7 @@ int cv::cuda::getCudaEnabledDeviceCount()
void cv::cuda::setDevice(int device)
{
#ifndef HAVE_CUDA
(void) device;
CV_UNUSED(device);
throw_no_cuda();
#else
cudaSafeCall( cudaSetDevice(device) );
@@ -98,7 +98,7 @@ void cv::cuda::resetDevice()
bool cv::cuda::deviceSupports(FeatureSet feature_set)
{
#ifndef HAVE_CUDA
(void) feature_set;
CV_UNUSED(feature_set);
throw_no_cuda();
#else
static int versions[] =
@@ -227,7 +227,7 @@ namespace
bool cv::cuda::TargetArchs::builtWith(cv::cuda::FeatureSet feature_set)
{
#ifndef HAVE_CUDA
(void) feature_set;
CV_UNUSED(feature_set);
throw_no_cuda();
#else
return cudaArch.builtWith(feature_set);
@@ -237,8 +237,8 @@ bool cv::cuda::TargetArchs::builtWith(cv::cuda::FeatureSet feature_set)
bool cv::cuda::TargetArchs::hasPtx(int major, int minor)
{
#ifndef HAVE_CUDA
(void) major;
(void) minor;
CV_UNUSED(major);
CV_UNUSED(minor);
throw_no_cuda();
#else
return cudaArch.hasPtx(major, minor);
@@ -248,8 +248,8 @@ bool cv::cuda::TargetArchs::hasPtx(int major, int minor)
bool cv::cuda::TargetArchs::hasBin(int major, int minor)
{
#ifndef HAVE_CUDA
(void) major;
(void) minor;
CV_UNUSED(major);
CV_UNUSED(minor);
throw_no_cuda();
#else
return cudaArch.hasBin(major, minor);
@@ -259,8 +259,8 @@ bool cv::cuda::TargetArchs::hasBin(int major, int minor)
bool cv::cuda::TargetArchs::hasEqualOrLessPtx(int major, int minor)
{
#ifndef HAVE_CUDA
(void) major;
(void) minor;
CV_UNUSED(major);
CV_UNUSED(minor);
throw_no_cuda();
#else
return cudaArch.hasEqualOrLessPtx(major, minor);
@@ -270,8 +270,8 @@ bool cv::cuda::TargetArchs::hasEqualOrLessPtx(int major, int minor)
bool cv::cuda::TargetArchs::hasEqualOrGreaterPtx(int major, int minor)
{
#ifndef HAVE_CUDA
(void) major;
(void) minor;
CV_UNUSED(major);
CV_UNUSED(minor);
throw_no_cuda();
#else
return cudaArch.hasEqualOrGreaterPtx(major, minor);
@@ -281,8 +281,8 @@ bool cv::cuda::TargetArchs::hasEqualOrGreaterPtx(int major, int minor)
bool cv::cuda::TargetArchs::hasEqualOrGreaterBin(int major, int minor)
{
#ifndef HAVE_CUDA
(void) major;
(void) minor;
CV_UNUSED(major);
CV_UNUSED(minor);
throw_no_cuda();
#else
return cudaArch.hasEqualOrGreaterBin(major, minor);
@@ -827,8 +827,8 @@ int cv::cuda::DeviceInfo::maxThreadsPerMultiProcessor() const
void cv::cuda::DeviceInfo::queryMemory(size_t& _totalMemory, size_t& _freeMemory) const
{
#ifndef HAVE_CUDA
(void) _totalMemory;
(void) _freeMemory;
CV_UNUSED(_totalMemory);
CV_UNUSED(_freeMemory);
throw_no_cuda();
#else
int prevDeviceID = getDevice();
@@ -894,7 +894,7 @@ namespace
void cv::cuda::printCudaDeviceInfo(int device)
{
#ifndef HAVE_CUDA
(void) device;
CV_UNUSED(device);
throw_no_cuda();
#else
int count = getCudaEnabledDeviceCount();
@@ -980,7 +980,7 @@ void cv::cuda::printCudaDeviceInfo(int device)
void cv::cuda::printShortCudaDeviceInfo(int device)
{
#ifndef HAVE_CUDA
(void) device;
CV_UNUSED(device);
throw_no_cuda();
#else
int count = getCudaEnabledDeviceCount();
@@ -1194,7 +1194,7 @@ namespace
String cv::cuda::getNppErrorMessage(int code)
{
#ifndef HAVE_CUDA
(void) code;
CV_UNUSED(code);
return String();
#else
return getErrorString(code, npp_errors, npp_error_num);
@@ -1204,7 +1204,7 @@ String cv::cuda::getNppErrorMessage(int code)
String cv::cuda::getCudaDriverApiErrorMessage(int code)
{
#ifndef HAVE_CUDA
(void) code;
CV_UNUSED(code);
return String();
#else
return getErrorString(code, cu_errors, cu_errors_num);
+19 -19
View File
@@ -267,7 +267,7 @@ class cv::cuda::Stream::Impl
public:
Impl(void* ptr = 0)
{
(void) ptr;
CV_UNUSED(ptr);
throw_no_cuda();
}
};
@@ -439,7 +439,7 @@ cv::cuda::Stream::Stream()
cv::cuda::Stream::Stream(const Ptr<GpuMat::Allocator>& allocator)
{
#ifndef HAVE_CUDA
(void) allocator;
CV_UNUSED(allocator);
throw_no_cuda();
#else
impl_ = makePtr<Impl>(allocator);
@@ -473,7 +473,7 @@ void cv::cuda::Stream::waitForCompletion()
void cv::cuda::Stream::waitEvent(const Event& event)
{
#ifndef HAVE_CUDA
(void) event;
CV_UNUSED(event);
throw_no_cuda();
#else
cudaSafeCall( cudaStreamWaitEvent(impl_->stream, EventAccessor::getEvent(event), 0) );
@@ -505,13 +505,13 @@ namespace
void cv::cuda::Stream::enqueueHostCallback(StreamCallback callback, void* userData)
{
#ifndef HAVE_CUDA
(void) callback;
(void) userData;
CV_UNUSED(callback);
CV_UNUSED(userData);
throw_no_cuda();
#else
#if CUDART_VERSION < 5000
(void) callback;
(void) userData;
CV_UNUSED(callback);
CV_UNUSED(userData);
CV_Error(cv::Error::StsNotImplemented, "This function requires CUDA >= 5.0");
#else
CallbackData* data = new CallbackData(callback, userData);
@@ -658,7 +658,7 @@ namespace
void cv::cuda::setBufferPoolUsage(bool on)
{
#ifndef HAVE_CUDA
(void)on;
CV_UNUSED(on);
throw_no_cuda();
#else
enableMemoryPool = on;
@@ -668,9 +668,9 @@ void cv::cuda::setBufferPoolUsage(bool on)
void cv::cuda::setBufferPoolConfig(int deviceId, size_t stackSize, int stackCount)
{
#ifndef HAVE_CUDA
(void)deviceId;
(void)stackSize;
(void)stackCount;
CV_UNUSED(deviceId);
CV_UNUSED(stackSize);
CV_UNUSED(stackCount);
throw_no_cuda();
#else
const int currentDevice = getDevice();
@@ -698,7 +698,7 @@ void cv::cuda::setBufferPoolConfig(int deviceId, size_t stackSize, int stackCoun
#ifndef HAVE_CUDA
cv::cuda::BufferPool::BufferPool(Stream& stream)
{
(void) stream;
CV_UNUSED(stream);
throw_no_cuda();
}
#else
@@ -710,9 +710,9 @@ cv::cuda::BufferPool::BufferPool(Stream& stream) : allocator_(stream.impl_->allo
GpuMat cv::cuda::BufferPool::getBuffer(int rows, int cols, int type)
{
#ifndef HAVE_CUDA
(void) rows;
(void) cols;
(void) type;
CV_UNUSED(rows);
CV_UNUSED(cols);
CV_UNUSED(type);
throw_no_cuda();
#else
GpuMat buf(allocator_);
@@ -782,7 +782,7 @@ Event cv::cuda::EventAccessor::wrapEvent(cudaEvent_t event)
cv::cuda::Event::Event(CreateFlags flags)
{
#ifndef HAVE_CUDA
(void) flags;
CV_UNUSED(flags);
throw_no_cuda();
#else
impl_ = makePtr<Impl>(flags);
@@ -792,7 +792,7 @@ cv::cuda::Event::Event(CreateFlags flags)
void cv::cuda::Event::record(Stream& stream)
{
#ifndef HAVE_CUDA
(void) stream;
CV_UNUSED(stream);
throw_no_cuda();
#else
cudaSafeCall( cudaEventRecord(impl_->event, StreamAccessor::getStream(stream)) );
@@ -826,8 +826,8 @@ void cv::cuda::Event::waitForCompletion()
float cv::cuda::Event::elapsedTime(const Event& start, const Event& end)
{
#ifndef HAVE_CUDA
(void) start;
(void) end;
CV_UNUSED(start);
CV_UNUSED(end);
throw_no_cuda();
#else
float ms;
+12 -12
View File
@@ -61,7 +61,7 @@ namespace cv { namespace directx {
int getTypeFromDXGI_FORMAT(const int iDXGI_FORMAT)
{
(void)iDXGI_FORMAT;
CV_UNUSED(iDXGI_FORMAT);
#if !defined(HAVE_DIRECTX)
NO_DIRECTX_SUPPORT_ERROR;
#else
@@ -179,7 +179,7 @@ int getTypeFromDXGI_FORMAT(const int iDXGI_FORMAT)
int getTypeFromD3DFORMAT(const int iD3DFORMAT)
{
(void)iD3DFORMAT;
CV_UNUSED(iD3DFORMAT);
#if !defined(HAVE_DIRECTX)
NO_DIRECTX_SUPPORT_ERROR;
#else
@@ -242,7 +242,7 @@ static bool g_isDirect3DDevice9Ex = false; // Direct3DDevice9Ex or Direct3DDevic
Context& initializeContextFromD3D11Device(ID3D11Device* pD3D11Device)
{
(void)pD3D11Device;
CV_UNUSED(pD3D11Device);
#if !defined(HAVE_DIRECTX)
NO_DIRECTX_SUPPORT_ERROR;
#elif !defined(HAVE_OPENCL)
@@ -350,7 +350,7 @@ Context& initializeContextFromD3D11Device(ID3D11Device* pD3D11Device)
Context& initializeContextFromD3D10Device(ID3D10Device* pD3D10Device)
{
(void)pD3D10Device;
CV_UNUSED(pD3D10Device);
#if !defined(HAVE_DIRECTX)
NO_DIRECTX_SUPPORT_ERROR;
#elif !defined(HAVE_OPENCL)
@@ -458,7 +458,7 @@ Context& initializeContextFromD3D10Device(ID3D10Device* pD3D10Device)
Context& initializeContextFromDirect3DDevice9Ex(IDirect3DDevice9Ex* pDirect3DDevice9Ex)
{
(void)pDirect3DDevice9Ex;
CV_UNUSED(pDirect3DDevice9Ex);
#if !defined(HAVE_DIRECTX)
NO_DIRECTX_SUPPORT_ERROR;
#elif !defined(HAVE_OPENCL)
@@ -568,7 +568,7 @@ Context& initializeContextFromDirect3DDevice9Ex(IDirect3DDevice9Ex* pDirect3DDev
Context& initializeContextFromDirect3DDevice9(IDirect3DDevice9* pDirect3DDevice9)
{
(void)pDirect3DDevice9;
CV_UNUSED(pDirect3DDevice9);
#if !defined(HAVE_DIRECTX)
NO_DIRECTX_SUPPORT_ERROR;
#elif !defined(HAVE_OPENCL)
@@ -764,7 +764,7 @@ namespace directx {
void convertToD3D11Texture2D(InputArray src, ID3D11Texture2D* pD3D11Texture2D)
{
(void)src; (void)pD3D11Texture2D;
CV_UNUSED(src); CV_UNUSED(pD3D11Texture2D);
#if !defined(HAVE_DIRECTX)
NO_DIRECTX_SUPPORT_ERROR;
#elif defined(HAVE_OPENCL)
@@ -873,7 +873,7 @@ void convertToD3D11Texture2D(InputArray src, ID3D11Texture2D* pD3D11Texture2D)
void convertFromD3D11Texture2D(ID3D11Texture2D* pD3D11Texture2D, OutputArray dst)
{
(void)pD3D11Texture2D; (void)dst;
CV_UNUSED(pD3D11Texture2D); CV_UNUSED(dst);
#if !defined(HAVE_DIRECTX)
NO_DIRECTX_SUPPORT_ERROR;
#elif defined(HAVE_OPENCL)
@@ -1004,7 +1004,7 @@ static void __OpenCLinitializeD3D10()
void convertToD3D10Texture2D(InputArray src, ID3D10Texture2D* pD3D10Texture2D)
{
(void)src; (void)pD3D10Texture2D;
CV_UNUSED(src); CV_UNUSED(pD3D10Texture2D);
#if !defined(HAVE_DIRECTX)
NO_DIRECTX_SUPPORT_ERROR;
#elif defined(HAVE_OPENCL)
@@ -1065,7 +1065,7 @@ void convertToD3D10Texture2D(InputArray src, ID3D10Texture2D* pD3D10Texture2D)
}
void convertFromD3D10Texture2D(ID3D10Texture2D* pD3D10Texture2D, OutputArray dst)
{
(void)pD3D10Texture2D; (void)dst;
CV_UNUSED(pD3D10Texture2D); CV_UNUSED(dst);
#if !defined(HAVE_DIRECTX)
NO_DIRECTX_SUPPORT_ERROR;
#elif defined(HAVE_OPENCL)
@@ -1152,7 +1152,7 @@ static void __OpenCLinitializeD3D9()
void convertToDirect3DSurface9(InputArray src, IDirect3DSurface9* pDirect3DSurface9, void* surfaceSharedHandle)
{
(void)src; (void)pDirect3DSurface9; (void)surfaceSharedHandle;
CV_UNUSED(src); CV_UNUSED(pDirect3DSurface9); CV_UNUSED(surfaceSharedHandle);
#if !defined(HAVE_DIRECTX)
NO_DIRECTX_SUPPORT_ERROR;
#elif defined(HAVE_OPENCL)
@@ -1220,7 +1220,7 @@ void convertToDirect3DSurface9(InputArray src, IDirect3DSurface9* pDirect3DSurfa
void convertFromDirect3DSurface9(IDirect3DSurface9* pDirect3DSurface9, OutputArray dst, void* surfaceSharedHandle)
{
(void)pDirect3DSurface9; (void)dst; (void)surfaceSharedHandle;
CV_UNUSED(pDirect3DSurface9); CV_UNUSED(dst); CV_UNUSED(surfaceSharedHandle);
#if !defined(HAVE_DIRECTX)
NO_DIRECTX_SUPPORT_ERROR;
#elif defined(HAVE_OPENCL)
+1 -1
View File
@@ -160,7 +160,7 @@ static bool isDir(const cv::String& path, DIR* dir)
return status && ((attributes & FILE_ATTRIBUTE_DIRECTORY) != 0);
#else
(void)dir;
CV_UNUSED(dir);
struct stat stat_buf;
if (0 != stat( path.c_str(), &stat_buf))
return false;
+1 -1
View File
@@ -118,7 +118,7 @@ void MatAllocator::copy(UMatData* usrc, UMatData* udst, int dims, const size_t s
BufferPoolController* MatAllocator::getBufferPoolController(const char* id) const
{
(void)id;
CV_UNUSED(id);
static DummyBufferPoolController dummy;
return &dummy;
}
+2 -2
View File
@@ -190,7 +190,7 @@ void traceOpenCLCheck(cl_int status, const char* message)
CV_OCL_TRACE_CHECK_RESULT(check_result, msg); \
if (check_result != CL_SUCCESS) \
{ \
if (0) { const char* msg_ = (msg); (void)msg_; /* ensure const char* type (cv::String without c_str()) */ } \
if (0) { const char* msg_ = (msg); CV_UNUSED(msg_); /* ensure const char* type (cv::String without c_str()) */ } \
cv::String error_msg = CV_OCL_API_ERROR_MSG(check_result, msg); \
CV_Error(Error::OpenCLApiCallError, error_msg); \
} \
@@ -210,7 +210,7 @@ void traceOpenCLCheck(cl_int status, const char* message)
CV_OCL_TRACE_CHECK_RESULT(check_result, msg); \
if (check_result != CL_SUCCESS && isRaiseError()) \
{ \
if (0) { const char* msg_ = (msg); (void)msg_; /* ensure const char* type (cv::String without c_str()) */ } \
if (0) { const char* msg_ = (msg); CV_UNUSED(msg_); /* ensure const char* type (cv::String without c_str()) */ } \
cv::String error_msg = CV_OCL_API_ERROR_MSG(check_result, msg); \
CV_Error(Error::OpenCLApiCallError, error_msg); \
} \
+82 -82
View File
@@ -104,11 +104,11 @@ namespace
void cv::cuda::setGlDevice(int device)
{
#ifndef HAVE_OPENGL
(void) device;
CV_UNUSED(device);
throw_no_ogl();
#else
#ifndef HAVE_CUDA
(void) device;
CV_UNUSED(device);
throw_no_cuda();
#else
cudaSafeCall( cudaGLSetGLDevice(device) );
@@ -214,7 +214,7 @@ namespace
CV_DbgAssert( resource_ != 0 );
GraphicsMapHolder h(&resource_, stream);
(void) h;
CV_UNUSED(h);
void* dst;
size_t size;
@@ -233,7 +233,7 @@ namespace
CV_DbgAssert( resource_ != 0 );
GraphicsMapHolder h(&resource_, stream);
(void) h;
CV_UNUSED(h);
void* src;
size_t size;
@@ -456,11 +456,11 @@ cv::ogl::Buffer::Buffer() : rows_(0), cols_(0), type_(0)
cv::ogl::Buffer::Buffer(int arows, int acols, int atype, unsigned int abufId, bool autoRelease) : rows_(0), cols_(0), type_(0)
{
#ifndef HAVE_OPENGL
(void) arows;
(void) acols;
(void) atype;
(void) abufId;
(void) autoRelease;
CV_UNUSED(arows);
CV_UNUSED(acols);
CV_UNUSED(atype);
CV_UNUSED(abufId);
CV_UNUSED(autoRelease);
throw_no_ogl();
#else
impl_.reset(new Impl(abufId, autoRelease));
@@ -473,10 +473,10 @@ cv::ogl::Buffer::Buffer(int arows, int acols, int atype, unsigned int abufId, bo
cv::ogl::Buffer::Buffer(Size asize, int atype, unsigned int abufId, bool autoRelease) : rows_(0), cols_(0), type_(0)
{
#ifndef HAVE_OPENGL
(void) asize;
(void) atype;
(void) abufId;
(void) autoRelease;
CV_UNUSED(asize);
CV_UNUSED(atype);
CV_UNUSED(abufId);
CV_UNUSED(autoRelease);
throw_no_ogl();
#else
impl_.reset(new Impl(abufId, autoRelease));
@@ -489,9 +489,9 @@ cv::ogl::Buffer::Buffer(Size asize, int atype, unsigned int abufId, bool autoRel
cv::ogl::Buffer::Buffer(InputArray arr, Target target, bool autoRelease) : rows_(0), cols_(0), type_(0)
{
#ifndef HAVE_OPENGL
(void) arr;
(void) target;
(void) autoRelease;
CV_UNUSED(arr);
CV_UNUSED(target);
CV_UNUSED(autoRelease);
throw_no_ogl();
#else
const int kind = arr.kind();
@@ -521,11 +521,11 @@ cv::ogl::Buffer::Buffer(InputArray arr, Target target, bool autoRelease) : rows_
void cv::ogl::Buffer::create(int arows, int acols, int atype, Target target, bool autoRelease)
{
#ifndef HAVE_OPENGL
(void) arows;
(void) acols;
(void) atype;
(void) target;
(void) autoRelease;
CV_UNUSED(arows);
CV_UNUSED(acols);
CV_UNUSED(atype);
CV_UNUSED(target);
CV_UNUSED(autoRelease);
throw_no_ogl();
#else
if (rows_ != arows || cols_ != acols || type_ != atype)
@@ -554,7 +554,7 @@ void cv::ogl::Buffer::release()
void cv::ogl::Buffer::setAutoRelease(bool flag)
{
#ifndef HAVE_OPENGL
(void) flag;
CV_UNUSED(flag);
throw_no_ogl();
#else
impl_->setAutoRelease(flag);
@@ -564,9 +564,9 @@ void cv::ogl::Buffer::setAutoRelease(bool flag)
void cv::ogl::Buffer::copyFrom(InputArray arr, Target target, bool autoRelease)
{
#ifndef HAVE_OPENGL
(void) arr;
(void) target;
(void) autoRelease;
CV_UNUSED(arr);
CV_UNUSED(target);
CV_UNUSED(autoRelease);
throw_no_ogl();
#else
const int kind = arr.kind();
@@ -609,17 +609,17 @@ void cv::ogl::Buffer::copyFrom(InputArray arr, Target target, bool autoRelease)
void cv::ogl::Buffer::copyFrom(InputArray arr, cuda::Stream& stream, Target target, bool autoRelease)
{
#ifndef HAVE_OPENGL
(void) arr;
(void) stream;
(void) target;
(void) autoRelease;
CV_UNUSED(arr);
CV_UNUSED(stream);
CV_UNUSED(target);
CV_UNUSED(autoRelease);
throw_no_ogl();
#else
#ifndef HAVE_CUDA
(void) arr;
(void) stream;
(void) target;
(void) autoRelease;
CV_UNUSED(arr);
CV_UNUSED(stream);
CV_UNUSED(target);
CV_UNUSED(autoRelease);
throw_no_cuda();
#else
GpuMat dmat = arr.getGpuMat();
@@ -634,7 +634,7 @@ void cv::ogl::Buffer::copyFrom(InputArray arr, cuda::Stream& stream, Target targ
void cv::ogl::Buffer::copyTo(OutputArray arr) const
{
#ifndef HAVE_OPENGL
(void) arr;
CV_UNUSED(arr);
throw_no_ogl();
#else
const int kind = arr.kind();
@@ -674,13 +674,13 @@ void cv::ogl::Buffer::copyTo(OutputArray arr) const
void cv::ogl::Buffer::copyTo(OutputArray arr, cuda::Stream& stream) const
{
#ifndef HAVE_OPENGL
(void) arr;
(void) stream;
CV_UNUSED(arr);
CV_UNUSED(stream);
throw_no_ogl();
#else
#ifndef HAVE_CUDA
(void) arr;
(void) stream;
CV_UNUSED(arr);
CV_UNUSED(stream);
throw_no_cuda();
#else
arr.create(rows_, cols_, type_);
@@ -693,8 +693,8 @@ void cv::ogl::Buffer::copyTo(OutputArray arr, cuda::Stream& stream) const
cv::ogl::Buffer cv::ogl::Buffer::clone(Target target, bool autoRelease) const
{
#ifndef HAVE_OPENGL
(void) target;
(void) autoRelease;
CV_UNUSED(target);
CV_UNUSED(autoRelease);
throw_no_ogl();
#else
ogl::Buffer buf;
@@ -706,7 +706,7 @@ cv::ogl::Buffer cv::ogl::Buffer::clone(Target target, bool autoRelease) const
void cv::ogl::Buffer::bind(Target target) const
{
#ifndef HAVE_OPENGL
(void) target;
CV_UNUSED(target);
throw_no_ogl();
#else
impl_->bind(target);
@@ -716,7 +716,7 @@ void cv::ogl::Buffer::bind(Target target) const
void cv::ogl::Buffer::unbind(Target target)
{
#ifndef HAVE_OPENGL
(void) target;
CV_UNUSED(target);
throw_no_ogl();
#else
gl::BindBuffer(target, 0);
@@ -727,7 +727,7 @@ void cv::ogl::Buffer::unbind(Target target)
Mat cv::ogl::Buffer::mapHost(Access access)
{
#ifndef HAVE_OPENGL
(void) access;
CV_UNUSED(access);
throw_no_ogl();
#else
return Mat(rows_, cols_, type_, impl_->mapHost(access));
@@ -772,11 +772,11 @@ void cv::ogl::Buffer::unmapDevice()
cuda::GpuMat cv::ogl::Buffer::mapDevice(cuda::Stream& stream)
{
#ifndef HAVE_OPENGL
(void) stream;
CV_UNUSED(stream);
throw_no_ogl();
#else
#ifndef HAVE_CUDA
(void) stream;
CV_UNUSED(stream);
throw_no_cuda();
#else
return GpuMat(rows_, cols_, type_, impl_->mapDevice(cuda::StreamAccessor::getStream(stream)));
@@ -787,11 +787,11 @@ cuda::GpuMat cv::ogl::Buffer::mapDevice(cuda::Stream& stream)
void cv::ogl::Buffer::unmapDevice(cuda::Stream& stream)
{
#ifndef HAVE_OPENGL
(void) stream;
CV_UNUSED(stream);
throw_no_ogl();
#else
#ifndef HAVE_CUDA
(void) stream;
CV_UNUSED(stream);
throw_no_cuda();
#else
impl_->unmapDevice(cuda::StreamAccessor::getStream(stream));
@@ -933,11 +933,11 @@ cv::ogl::Texture2D::Texture2D() : rows_(0), cols_(0), format_(NONE)
cv::ogl::Texture2D::Texture2D(int arows, int acols, Format aformat, unsigned int atexId, bool autoRelease) : rows_(0), cols_(0), format_(NONE)
{
#ifndef HAVE_OPENGL
(void) arows;
(void) acols;
(void) aformat;
(void) atexId;
(void) autoRelease;
CV_UNUSED(arows);
CV_UNUSED(acols);
CV_UNUSED(aformat);
CV_UNUSED(atexId);
CV_UNUSED(autoRelease);
throw_no_ogl();
#else
impl_.reset(new Impl(atexId, autoRelease));
@@ -950,10 +950,10 @@ cv::ogl::Texture2D::Texture2D(int arows, int acols, Format aformat, unsigned int
cv::ogl::Texture2D::Texture2D(Size asize, Format aformat, unsigned int atexId, bool autoRelease) : rows_(0), cols_(0), format_(NONE)
{
#ifndef HAVE_OPENGL
(void) asize;
(void) aformat;
(void) atexId;
(void) autoRelease;
CV_UNUSED(asize);
CV_UNUSED(aformat);
CV_UNUSED(atexId);
CV_UNUSED(autoRelease);
throw_no_ogl();
#else
impl_.reset(new Impl(atexId, autoRelease));
@@ -966,8 +966,8 @@ cv::ogl::Texture2D::Texture2D(Size asize, Format aformat, unsigned int atexId, b
cv::ogl::Texture2D::Texture2D(InputArray arr, bool autoRelease) : rows_(0), cols_(0), format_(NONE)
{
#ifndef HAVE_OPENGL
(void) arr;
(void) autoRelease;
CV_UNUSED(arr);
CV_UNUSED(autoRelease);
throw_no_ogl();
#else
const int kind = arr.kind();
@@ -1036,10 +1036,10 @@ cv::ogl::Texture2D::Texture2D(InputArray arr, bool autoRelease) : rows_(0), cols
void cv::ogl::Texture2D::create(int arows, int acols, Format aformat, bool autoRelease)
{
#ifndef HAVE_OPENGL
(void) arows;
(void) acols;
(void) aformat;
(void) autoRelease;
CV_UNUSED(arows);
CV_UNUSED(acols);
CV_UNUSED(aformat);
CV_UNUSED(autoRelease);
throw_no_ogl();
#else
if (rows_ != arows || cols_ != acols || format_ != aformat)
@@ -1068,7 +1068,7 @@ void cv::ogl::Texture2D::release()
void cv::ogl::Texture2D::setAutoRelease(bool flag)
{
#ifndef HAVE_OPENGL
(void) flag;
CV_UNUSED(flag);
throw_no_ogl();
#else
impl_->setAutoRelease(flag);
@@ -1078,8 +1078,8 @@ void cv::ogl::Texture2D::setAutoRelease(bool flag)
void cv::ogl::Texture2D::copyFrom(InputArray arr, bool autoRelease)
{
#ifndef HAVE_OPENGL
(void) arr;
(void) autoRelease;
CV_UNUSED(arr);
CV_UNUSED(autoRelease);
throw_no_ogl();
#else
const int kind = arr.kind();
@@ -1145,9 +1145,9 @@ void cv::ogl::Texture2D::copyFrom(InputArray arr, bool autoRelease)
void cv::ogl::Texture2D::copyTo(OutputArray arr, int ddepth, bool autoRelease) const
{
#ifndef HAVE_OPENGL
(void) arr;
(void) ddepth;
(void) autoRelease;
CV_UNUSED(arr);
CV_UNUSED(ddepth);
CV_UNUSED(autoRelease);
throw_no_ogl();
#else
const int kind = arr.kind();
@@ -1400,9 +1400,9 @@ void cv::ogl::Arrays::bind() const
void cv::ogl::render(const ogl::Texture2D& tex, Rect_<double> wndRect, Rect_<double> texRect)
{
#ifndef HAVE_OPENGL
(void) tex;
(void) wndRect;
(void) texRect;
CV_UNUSED(tex);
CV_UNUSED(wndRect);
CV_UNUSED(texRect);
throw_no_ogl();
#else
if (!tex.empty())
@@ -1472,9 +1472,9 @@ void cv::ogl::render(const ogl::Texture2D& tex, Rect_<double> wndRect, Rect_<dou
void cv::ogl::render(const ogl::Arrays& arr, int mode, Scalar color)
{
#ifndef HAVE_OPENGL
(void) arr;
(void) mode;
(void) color;
CV_UNUSED(arr);
CV_UNUSED(mode);
CV_UNUSED(color);
throw_no_ogl();
#else
if (!arr.empty())
@@ -1491,10 +1491,10 @@ void cv::ogl::render(const ogl::Arrays& arr, int mode, Scalar color)
void cv::ogl::render(const ogl::Arrays& arr, InputArray indices, int mode, Scalar color)
{
#ifndef HAVE_OPENGL
(void) arr;
(void) indices;
(void) mode;
(void) color;
CV_UNUSED(arr);
CV_UNUSED(indices);
CV_UNUSED(mode);
CV_UNUSED(color);
throw_no_ogl();
#else
if (!arr.empty() && !indices.empty())
@@ -1688,7 +1688,7 @@ Context& initializeContextFromGL()
void convertToGLTexture2D(InputArray src, Texture2D& texture)
{
(void)src; (void)texture;
CV_UNUSED(src); CV_UNUSED(texture);
#if !defined(HAVE_OPENGL)
NO_OPENGL_SUPPORT_ERROR;
#elif !defined(HAVE_OPENCL)
@@ -1742,7 +1742,7 @@ void convertToGLTexture2D(InputArray src, Texture2D& texture)
void convertFromGLTexture2D(const Texture2D& texture, OutputArray dst)
{
(void)texture; (void)dst;
CV_UNUSED(texture); CV_UNUSED(dst);
#if !defined(HAVE_OPENGL)
NO_OPENGL_SUPPORT_ERROR;
#elif !defined(HAVE_OPENCL)
@@ -1803,7 +1803,7 @@ void convertFromGLTexture2D(const Texture2D& texture, OutputArray dst)
//void mapGLBuffer(const Buffer& buffer, UMat& dst, int accessFlags)
UMat mapGLBuffer(const Buffer& buffer, int accessFlags)
{
(void)buffer; (void)accessFlags;
CV_UNUSED(buffer); CV_UNUSED(accessFlags);
#if !defined(HAVE_OPENGL)
NO_OPENGL_SUPPORT_ERROR;
#elif !defined(HAVE_OPENCL)
@@ -1855,7 +1855,7 @@ UMat mapGLBuffer(const Buffer& buffer, int accessFlags)
void unmapGLBuffer(UMat& u)
{
(void)u;
CV_UNUSED(u);
#if !defined(HAVE_OPENGL)
NO_OPENGL_SUPPORT_ERROR;
#elif !defined(HAVE_OPENCL)
+2 -2
View File
@@ -518,7 +518,7 @@ void cv::parallel_for_(const cv::Range& range, const cv::ParallelLoopBody& body,
else // nested parallel_for_() calls are not parallelized
#endif // CV_PARALLEL_FRAMEWORK
{
(void)nstripes;
CV_UNUSED(nstripes);
body(range);
}
}
@@ -680,7 +680,7 @@ unsigned defaultNumberOfThreads()
void cv::setNumThreads( int threads_ )
{
(void)threads_;
CV_UNUSED(threads_);
#ifdef CV_PARALLEL_FRAMEWORK
int threads = (threads_ < 0) ? defaultNumberOfThreads() : (unsigned)threads_;
numThreads = threads;
+1 -1
View File
@@ -200,7 +200,7 @@ struct NoVec
size_t operator()(const void*, const void*, void*, size_t) const { return 0; }
};
#define CV_SPLIT_MERGE_MAX_BLOCK_SIZE(cn) ((INT_MAX/4)/cn) // HAL implementation accepts 'int' len, so INT_MAX doesn't work here
#define CV_SPLIT_MERGE_MAX_BLOCK_SIZE(cn) ((INT_MAX/4)/(cn)) // HAL implementation accepts 'int' len, so INT_MAX doesn't work here
enum { BLOCK_SIZE = 1024 };
+2 -2
View File
@@ -2141,7 +2141,7 @@ void setUseIPP(bool flag)
#ifdef HAVE_IPP
data->useIPP = (getIPPSingleton().useIPP)?flag:false;
#else
(void)flag;
CV_UNUSED(flag);
data->useIPP = false;
#endif
}
@@ -2166,7 +2166,7 @@ void setUseIPP_NE(bool flag)
#ifdef HAVE_IPP
data->useIPP_NE = (getIPPSingleton().useIPP_NE)?flag:false;
#else
(void)flag;
CV_UNUSED(flag);
data->useIPP_NE = false;
#endif
}
+1 -1
View File
@@ -892,7 +892,7 @@ bool TraceManager::isActivated()
if (!isInitialized)
{
TraceManager& m = getTraceManager();
(void)m; // TODO
CV_UNUSED(m); // TODO
}
return activated;
+1 -1
View File
@@ -122,7 +122,7 @@ UMatData::~UMatData()
}
}
#else
(void)showWarn;
CV_UNUSED(showWarn);
#endif
originalUMatData = NULL;
}
+3 -3
View File
@@ -46,7 +46,7 @@ namespace ocl {
Context& initializeContextFromVA(VADisplay display, bool tryInterop)
{
(void)display; (void)tryInterop;
CV_UNUSED(display); CV_UNUSED(tryInterop);
#if !defined(HAVE_VA)
NO_VA_SUPPORT_ERROR;
#else // !HAVE_VA
@@ -485,7 +485,7 @@ static void copy_convert_bgr_to_yv12(const VAImage& image, const Mat& bgr, unsig
void convertToVASurface(VADisplay display, InputArray src, VASurfaceID surface, Size size)
{
(void)display; (void)src; (void)surface; (void)size;
CV_UNUSED(display); CV_UNUSED(src); CV_UNUSED(surface); CV_UNUSED(size);
#if !defined(HAVE_VA)
NO_VA_SUPPORT_ERROR;
#else // !HAVE_VA
@@ -589,7 +589,7 @@ void convertToVASurface(VADisplay display, InputArray src, VASurfaceID surface,
void convertFromVASurface(VADisplay display, VASurfaceID surface, Size size, OutputArray dst)
{
(void)display; (void)surface; (void)dst; (void)size;
CV_UNUSED(display); CV_UNUSED(surface); CV_UNUSED(dst); CV_UNUSED(size);
#if !defined(HAVE_VA)
NO_VA_SUPPORT_ERROR;
#else // !HAVE_VA