mirror of
https://github.com/opencv/opencv.git
synced 2025-06-28 07:23:30 +08:00
Added fallback to generic linear resize in case bit-exact resize of provided matrix isn't supported
This commit is contained in:
parent
1bc1f3d311
commit
5fdb42a7c9
@ -4153,6 +4153,9 @@ void cv::resize( InputArray _src, OutputArray _dst, Size dsize,
|
|||||||
inv_scale_y = (double)dsize.height/ssize.height;
|
inv_scale_y = (double)dsize.height/ssize.height;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (interpolation == INTER_LINEAR_EXACT && (_src.depth() == CV_32F || _src.depth() == CV_64F))
|
||||||
|
interpolation = INTER_LINEAR; // If depth isn't supported fallback to generic resize
|
||||||
|
|
||||||
CV_OCL_RUN(_src.dims() <= 2 && _dst.isUMat() && _src.cols() > 10 && _src.rows() > 10,
|
CV_OCL_RUN(_src.dims() <= 2 && _dst.isUMat() && _src.cols() > 10 && _src.rows() > 10,
|
||||||
ocl_resize(_src, _dst, dsize, inv_scale_x, inv_scale_y, interpolation))
|
ocl_resize(_src, _dst, dsize, inv_scale_x, inv_scale_y, interpolation))
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user