mirror of
https://github.com/opencv/opencv.git
synced 2024-11-25 11:40:44 +08:00
fixed seg faults
This commit is contained in:
parent
ee316758ca
commit
f939d80f4c
@ -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…
Reference in New Issue
Block a user