fixed several warnings (VS2010, Win64)
added getParams method to VideoWriter_GPU
This commit is contained in:
@@ -692,7 +692,7 @@ namespace
|
||||
w.clear();
|
||||
h.clear();
|
||||
|
||||
for (int i = img0.size() - 1; i >= 0; --i)
|
||||
for (int i = static_cast<int>(img0.size()) - 1; i >= 0; --i)
|
||||
{
|
||||
delete img1[i];
|
||||
delete img0[i];
|
||||
|
@@ -83,7 +83,7 @@ struct HaarFeature64
|
||||
__host__ NCVStatus setRect(Ncv32u rectX, Ncv32u rectY, Ncv32u rectWidth, Ncv32u rectHeight, Ncv32u /*clsWidth*/, Ncv32u /*clsHeight*/)
|
||||
{
|
||||
ncvAssertReturn(rectWidth <= HaarFeature64_CreateCheck_MaxRectField && rectHeight <= HaarFeature64_CreateCheck_MaxRectField, NCV_HAAR_TOO_LARGE_FEATURES);
|
||||
_rect = NcvRect8u(rectX,rectY,rectWidth,rectHeight);
|
||||
_rect = NcvRect8u(static_cast<Ncv8u>(rectX),static_cast<Ncv8u>(rectY),static_cast<Ncv8u>(rectWidth),static_cast<Ncv8u>(rectHeight));
|
||||
|
||||
return NCV_SUCCESS;
|
||||
}
|
||||
|
@@ -295,7 +295,7 @@ NCVMemStackAllocator::NCVMemStackAllocator(NCVMemoryType memT, size_t capacity,
|
||||
break;
|
||||
case NCVMemoryTypeHostPageable:
|
||||
allocBegin = (Ncv8u *)malloc(capacity);
|
||||
break;
|
||||
break;
|
||||
default:;
|
||||
}
|
||||
}
|
||||
@@ -336,7 +336,7 @@ NCVMemStackAllocator::~NCVMemStackAllocator()
|
||||
break;
|
||||
case NCVMemoryTypeHostPageable:
|
||||
free(allocBegin);
|
||||
break;
|
||||
break;
|
||||
default:;
|
||||
}
|
||||
}
|
||||
@@ -351,7 +351,7 @@ NCVStatus NCVMemStackAllocator::alloc(NCVMemSegment &seg, size_t size)
|
||||
seg.clear();
|
||||
ncvAssertReturn(isInitialized(), NCV_ALLOCATOR_BAD_ALLOC);
|
||||
|
||||
size = alignUp(size, this->_alignment);
|
||||
size = alignUp(static_cast<Ncv32u>(size), this->_alignment);
|
||||
this->currentSize += size;
|
||||
this->_maxSize = std::max(this->_maxSize, this->currentSize);
|
||||
|
||||
@@ -457,11 +457,11 @@ NCVStatus NCVMemNativeAllocator::alloc(NCVMemSegment &seg, size_t size)
|
||||
break;
|
||||
case NCVMemoryTypeHostPageable:
|
||||
seg.begin.ptr = (Ncv8u *)malloc(size);
|
||||
break;
|
||||
break;
|
||||
default:;
|
||||
}
|
||||
|
||||
this->currentSize += alignUp(size, this->_alignment);
|
||||
this->currentSize += alignUp(static_cast<Ncv32u>(size), this->_alignment);
|
||||
this->_maxSize = std::max(this->_maxSize, this->currentSize);
|
||||
|
||||
seg.begin.memtype = this->_memType;
|
||||
@@ -477,8 +477,8 @@ NCVStatus NCVMemNativeAllocator::dealloc(NCVMemSegment &seg)
|
||||
ncvAssertReturn(seg.begin.memtype == this->_memType, NCV_ALLOCATOR_BAD_DEALLOC);
|
||||
ncvAssertReturn(seg.begin.ptr != NULL, NCV_ALLOCATOR_BAD_DEALLOC);
|
||||
|
||||
ncvAssertReturn(currentSize >= alignUp(seg.size, this->_alignment), NCV_ALLOCATOR_BAD_DEALLOC);
|
||||
currentSize -= alignUp(seg.size, this->_alignment);
|
||||
ncvAssertReturn(currentSize >= alignUp(static_cast<Ncv32u>(seg.size), this->_alignment), NCV_ALLOCATOR_BAD_DEALLOC);
|
||||
currentSize -= alignUp(static_cast<Ncv32u>(seg.size), this->_alignment);
|
||||
|
||||
switch (this->_memType)
|
||||
{
|
||||
@@ -490,7 +490,7 @@ NCVStatus NCVMemNativeAllocator::dealloc(NCVMemSegment &seg)
|
||||
break;
|
||||
case NCVMemoryTypeHostPageable:
|
||||
free(seg.begin.ptr);
|
||||
break;
|
||||
break;
|
||||
default:;
|
||||
}
|
||||
|
||||
|
@@ -211,7 +211,8 @@ namespace cv { namespace gpu { namespace device
|
||||
dim3 bDim(16, 8);
|
||||
dim3 gDim(divUp(src.cols, bDim.x), divUp(src.rows, bDim.y));
|
||||
|
||||
kernelDownsampleX2<<<gDim, bDim, 0, stream>>>((T*)src.data, src.step, (T*)dst.data, dst.step, NcvSize32u(dst.cols, dst.rows));
|
||||
kernelDownsampleX2<<<gDim, bDim, 0, stream>>>((T*)src.data, static_cast<Ncv32u>(src.step),
|
||||
(T*)dst.data, static_cast<Ncv32u>(dst.step), NcvSize32u(dst.cols, dst.rows));
|
||||
|
||||
cudaSafeCall( cudaGetLastError() );
|
||||
|
||||
@@ -285,8 +286,8 @@ namespace cv { namespace gpu { namespace device
|
||||
dim3 bDim(16, 8);
|
||||
dim3 gDim(divUp(dst.cols, bDim.x), divUp(dst.rows, bDim.y));
|
||||
|
||||
kernelInterpolateFrom1<<<gDim, bDim, 0, stream>>>((T*) src.data, src.step, NcvSize32u(src.cols, src.rows),
|
||||
(T*) dst.data, dst.step, NcvSize32u(dst.cols, dst.rows));
|
||||
kernelInterpolateFrom1<<<gDim, bDim, 0, stream>>>((T*) src.data, static_cast<Ncv32u>(src.step), NcvSize32u(src.cols, src.rows),
|
||||
(T*) dst.data, static_cast<Ncv32u>(dst.step), NcvSize32u(dst.cols, dst.rows));
|
||||
|
||||
cudaSafeCall( cudaGetLastError() );
|
||||
|
||||
|
Reference in New Issue
Block a user