Tegra optimization for some color conversion and warpAffine calls
This commit is contained in:
parent
11ad582250
commit
185680c7c5
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user