fixed seg faults

pull/3785/head
Vladislav Vinogradov 10 years ago
parent ee316758ca
commit f939d80f4c
  1. 6
      modules/gpu/src/cuda/copy_make_border.cu
  2. 6
      modules/gpu/src/cuda/resize.cu

@ -97,7 +97,11 @@ namespace cv { namespace gpu { namespace device
#endif
};
callers[borderMode](PtrStepSz<vec_type>(src), PtrStepSz<vec_type>(dst), top, left, borderValue, stream);
const caller_t caller = callers[borderMode];
if (!caller)
cv::gpu::error("Unsupported input parameters for copyMakeBorder", __FILE__, __LINE__, "");
caller(PtrStepSz<vec_type>(src), PtrStepSz<vec_type>(dst), top, left, borderValue, stream);
}
template void copyMakeBorder_gpu<uchar, 1>(const PtrStepSzb& src, const PtrStepSzb& dst, int top, int left, int borderMode, const uchar* borderValue, cudaStream_t stream);

@ -485,7 +485,11 @@ namespace cv { namespace gpu { namespace device
if (interpolation == 3 && (fx <= 1.f || fy <= 1.f))
interpolation = 1;
funcs[interpolation](static_cast< PtrStepSz<T> >(src), static_cast< PtrStepSz<T> >(srcWhole), yoff, xoff, static_cast< PtrStepSz<T> >(dst), fy, fx, stream);
const func_t func = funcs[interpolation];
if (!func)
cv::gpu::error("Unsupported input parameters for resize", __FILE__, __LINE__, "");
func(static_cast< PtrStepSz<T> >(src), static_cast< PtrStepSz<T> >(srcWhole), yoff, xoff, static_cast< PtrStepSz<T> >(dst), fy, fx, stream);
}
template void resize<uchar >(const PtrStepSzb& src, const PtrStepSzb& srcWhole, int yoff, int xoff, const PtrStepSzb& dst, float fy, float fx, int interpolation, cudaStream_t stream);

Loading…
Cancel
Save