提交 185680c7 编写于 作者: A Andrey Pavlenko

Tegra optimization for some color conversion and warpAffine calls

上级 11ad5822
......@@ -2845,7 +2845,12 @@ void cv::cvtColor( InputArray _src, OutputArray _dst, int code, int dcn )
bidx = code == CV_BGR2GRAY || code == CV_BGRA2GRAY ? 0 : 2;
if( depth == CV_8U )
{
#ifdef HAVE_TEGRA_OPTIMIZATION
if( code != CV_RGBA2GRAY || !tegra::Rgba2Gray(src, dst) )
#endif
CvtColorLoop(src, dst, RGB2Gray<uchar>(scn, bidx, 0));
}
else if( depth == CV_16U )
CvtColorLoop(src, dst, RGB2Gray<ushort>(scn, bidx, 0));
else
......@@ -2867,7 +2872,12 @@ void cv::cvtColor( InputArray _src, OutputArray _dst, int code, int dcn )
dst = _dst.getMat();
if( depth == CV_8U )
{
#ifdef HAVE_TEGRA_OPTIMIZATION
if(code != CV_GRAY2RGBA || !tegra::Gray2Rgba(src, dst))
#endif
CvtColorLoop(src, dst, Gray2RGB<uchar>(dcn));
}
else if( depth == CV_16U )
CvtColorLoop(src, dst, Gray2RGB<ushort>(dcn));
else
......
......@@ -2843,6 +2843,11 @@ void cv::warpAffine( InputArray _src, OutputArray _dst,
M[2] = b1; M[5] = b2;
}
#ifdef HAVE_TEGRA_OPTIMIZATION
if( tegra::warpAffine(src, dst, M, interpolation, borderType, borderValue) )
return;
#endif
int x, y, x1, y1, width = dst.cols, height = dst.rows;
AutoBuffer<int> _abdelta(width*2);
int* adelta = &_abdelta[0], *bdelta = adelta + width;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册