Commit 8190837d authored by Vladislav Vinogradov's avatar Vladislav Vinogradov

fixed some warnings under linux

parent 0cd587ee
...@@ -810,7 +810,6 @@ Ptr<FilterEngine_GPU> cv::gpu::createSeparableLinearFilter_GPU(int srcType, int ...@@ -810,7 +810,6 @@ Ptr<FilterEngine_GPU> cv::gpu::createSeparableLinearFilter_GPU(int srcType, int
if (columnBorderType < 0) if (columnBorderType < 0)
columnBorderType = rowBorderType; columnBorderType = rowBorderType;
int sdepth = CV_MAT_DEPTH(srcType), ddepth = CV_MAT_DEPTH(dstType);
int cn = CV_MAT_CN(srcType); int cn = CV_MAT_CN(srcType);
int bdepth = CV_32F; int bdepth = CV_32F;
int bufType = CV_MAKETYPE(bdepth, cn); int bufType = CV_MAKETYPE(bdepth, cn);
......
...@@ -309,12 +309,12 @@ void cv::gpu::copyMakeBorder(const GpuMat& src, GpuMat& dst, int top, int bottom ...@@ -309,12 +309,12 @@ void cv::gpu::copyMakeBorder(const GpuMat& src, GpuMat& dst, int top, int bottom
dst.create(src.rows + top + bottom, src.cols + left + right, src.type()); dst.create(src.rows + top + bottom, src.cols + left + right, src.type());
NppiSize srcsz; NppiSize srcsz;
srcsz.width = src.cols; srcsz.width = src.cols;
srcsz.height = src.rows; srcsz.height = src.rows;
NppiSize dstsz; NppiSize dstsz;
dstsz.width = dst.cols; dstsz.width = dst.cols;
dstsz.height = dst.rows; dstsz.height = dst.rows;
switch (src.type()) switch (src.type())
{ {
...@@ -341,7 +341,7 @@ void cv::gpu::copyMakeBorder(const GpuMat& src, GpuMat& dst, int top, int bottom ...@@ -341,7 +341,7 @@ void cv::gpu::copyMakeBorder(const GpuMat& src, GpuMat& dst, int top, int bottom
} }
case CV_32FC1: case CV_32FC1:
{ {
float val = static_cast<float>(value[0]); Npp32f val = static_cast<Npp32f>(value[0]);
Npp32s nVal = *(reinterpret_cast<Npp32s*>(&val)); Npp32s nVal = *(reinterpret_cast<Npp32s*>(&val));
nppSafeCall( nppiCopyConstBorder_32s_C1R(src.ptr<Npp32s>(), src.step, srcsz, nppSafeCall( nppiCopyConstBorder_32s_C1R(src.ptr<Npp32s>(), src.step, srcsz,
dst.ptr<Npp32s>(), dst.step, dstsz, top, left, nVal) ); dst.ptr<Npp32s>(), dst.step, dstsz, top, left, nVal) );
......
...@@ -577,7 +577,7 @@ void cv::gpu::matchTemplate(const GpuMat& image, const GpuMat& templ, GpuMat& re ...@@ -577,7 +577,7 @@ void cv::gpu::matchTemplate(const GpuMat& image, const GpuMat& templ, GpuMat& re
static const Caller callers32F[] = { ::matchTemplate_SQDIFF_32F, 0, static const Caller callers32F[] = { ::matchTemplate_SQDIFF_32F, 0,
::matchTemplate_CCORR_32F, 0, 0, 0 }; ::matchTemplate_CCORR_32F, 0, 0, 0 };
const Caller* callers; const Caller* callers = 0;
switch (image.depth()) switch (image.depth())
{ {
case CV_8U: callers = callers8U; break; case CV_8U: callers = callers8U; break;
......
...@@ -130,9 +130,7 @@ namespace ...@@ -130,9 +130,7 @@ namespace
{ {
CV_Assert(0 < rthis.ndisp && 0 < rthis.iters && 0 < rthis.levels); CV_Assert(0 < rthis.ndisp && 0 < rthis.iters && 0 < rthis.levels);
CV_Assert(rthis.msg_type == CV_32F || rthis.msg_type == CV_16S); CV_Assert(rthis.msg_type == CV_32F || rthis.msg_type == CV_16S);
CV_Assert(rthis.msg_type == CV_32F || (1 << (rthis.levels - 1)) * scale * rthis.max_data_term < numeric_limits<short>::max());
if (rthis.msg_type == CV_16S)
CV_Assert((1 << (rthis.levels - 1)) * scale * rthis.max_data_term < numeric_limits<short>::max());
} }
void operator()(const GpuMat& left, const GpuMat& right, GpuMat& disp, cudaStream_t stream) void operator()(const GpuMat& left, const GpuMat& right, GpuMat& disp, cudaStream_t stream)
......
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