From 5b17a60dde5cb7706bc3b7f6caeb2dcb46850259 Mon Sep 17 00:00:00 2001 From: Alexander Alekhin Date: Wed, 28 Mar 2018 15:19:54 +0300 Subject: [PATCH] next: drop HAVE_TEGRA_OPTIMIZATION/TADP --- .../android_binary_package/O4A_SDK.markdown | 12 ----- .../android_dev_intro.markdown | 25 ---------- modules/calib3d/src/circlesgrid.cpp | 4 -- modules/calib3d/src/precomp.hpp | 4 -- modules/core/include/opencv2/core/fast_math.hpp | 10 ---- modules/core/include/opencv2/core/private.hpp | 9 ---- modules/core/src/arithm.cpp | 53 ---------------------- modules/core/src/precomp.hpp | 10 ---- modules/core/src/system.cpp | 33 -------------- modules/features2d/src/fast.cpp | 4 -- modules/features2d/src/precomp.hpp | 4 -- modules/highgui/src/precomp.hpp | 4 -- modules/imgproc/src/canny.cpp | 5 -- modules/imgproc/src/corner.cpp | 4 -- modules/imgproc/src/deriv.cpp | 14 ------ modules/imgproc/src/precomp.hpp | 4 -- modules/imgproc/src/pyramids.cpp | 10 ---- modules/imgproc/src/smooth.cpp | 5 -- modules/imgproc/src/templmatch.cpp | 5 -- modules/imgproc/src/thresh.cpp | 17 ------- modules/objdetect/src/cascadedetect.cpp | 4 -- modules/objdetect/src/precomp.hpp | 4 -- modules/photo/src/denoising.cpp | 5 -- modules/photo/src/precomp.hpp | 4 -- modules/stitching/src/blenders.cpp | 12 ----- modules/stitching/src/matchers.cpp | 5 -- modules/stitching/src/precomp.hpp | 4 -- modules/ts/src/ts_func.cpp | 10 ---- modules/video/src/lkpyramid.cpp | 10 ---- modules/video/src/precomp.hpp | 4 -- 30 files changed, 298 deletions(-) diff --git a/doc/tutorials/introduction/android_binary_package/O4A_SDK.markdown b/doc/tutorials/introduction/android_binary_package/O4A_SDK.markdown index cb61f6d..57600c0 100644 --- a/doc/tutorials/introduction/android_binary_package/O4A_SDK.markdown +++ b/doc/tutorials/introduction/android_binary_package/O4A_SDK.markdown @@ -19,18 +19,6 @@ If you encounter any error after thoroughly following these steps, feel free to [OpenCV4Android](https://groups.google.com/group/android-opencv/) discussion group or OpenCV [Q&A forum](http://answers.opencv.org). We'll do our best to help you out. -Tegra Android Development Pack users ------------------------------------- - -You may have used [Tegra Android Development -Pack](http://developer.nvidia.com/tegra-android-development-pack) (**TADP**) released by **NVIDIA** -for Android development environment setup. - -Beside Android development tools the TADP 2.0 includes OpenCV4Android SDK, so it can be already -installed in your system and you can skip to @ref tutorial_O4A_SDK_samples "samples" section of this tutorial. - -More details regarding TADP can be found in the @ref tutorial_android_dev_intro guide. - General info ------------ diff --git a/doc/tutorials/introduction/android_binary_package/android_dev_intro.markdown b/doc/tutorials/introduction/android_binary_package/android_dev_intro.markdown index 5d43b22..a614081 100644 --- a/doc/tutorials/introduction/android_binary_package/android_dev_intro.markdown +++ b/doc/tutorials/introduction/android_binary_package/android_dev_intro.markdown @@ -31,31 +31,6 @@ key topis: -# OpenCV development will certainly require some knowledge of the [Android Camera](http://developer.android.com/guide/topics/media/camera.html) specifics. -Quick environment setup for Android development ------------------------------------------------ - -If you are making a clean environment install, then you can try [Tegra Android Development -Pack](https://developer.nvidia.com/tegra-android-development-pack) (**TADP**) released by -**NVIDIA**. - -@note Starting the *version 2.0* the TADP package includes *OpenCV for Tegra* SDK that is a regular -*OpenCV4Android SDK* extended with Tegra-specific stuff. When unpacked, TADP will cover all of the -environment setup automatically and you can skip the rest of the guide. - -If you are a beginner in Android development then we also recommend you to start with TADP. - -@note *NVIDIA*'s Tegra Android Development Pack includes some special features for *NVIDIA*’s [Tegra -platform](http://www.nvidia.com/object/tegra-3-processor.html) -but its use is not limited to *Tegra* devices only. \* You need at least *1.6 Gb* free -disk space for the install. - -- TADP will download Android SDK platforms and Android NDK from Google's server, so Internet - connection is required for the installation. -- TADP may ask you to flash your development kit at the end of installation process. Just skip - this step if you have no [Tegra Development Kit](http://developer.nvidia.com/mobile/tegra-hardware-sales-inquiries). -- (UNIX) TADP will ask you for *root* in the middle of installation, so you need to be a member of - *sudo* group. - Manual environment setup for Android development ------------------------------------------------ diff --git a/modules/calib3d/src/circlesgrid.cpp b/modules/calib3d/src/circlesgrid.cpp index 1a08e3d..aecafa2 100644 --- a/modules/calib3d/src/circlesgrid.cpp +++ b/modules/calib3d/src/circlesgrid.cpp @@ -69,10 +69,6 @@ void drawPoints(const std::vector &points, Mat &outImage, int radius = void CirclesGridClusterFinder::hierarchicalClustering(const std::vector &points, const Size &patternSz, std::vector &patternPoints) { -#ifdef HAVE_TEGRA_OPTIMIZATION - if(tegra::useTegra() && tegra::hierarchicalClustering(points, patternSz, patternPoints)) - return; -#endif int j, n = (int)points.size(); size_t pn = static_cast(patternSz.area()); diff --git a/modules/calib3d/src/precomp.hpp b/modules/calib3d/src/precomp.hpp index 753c46a..b112786 100644 --- a/modules/calib3d/src/precomp.hpp +++ b/modules/calib3d/src/precomp.hpp @@ -51,11 +51,7 @@ #include "opencv2/core/ocl.hpp" -#ifdef HAVE_TEGRA_OPTIMIZATION -#include "opencv2/calib3d/calib3d_tegra.hpp" -#else #define GET_OPTIMIZED(func) (func) -#endif namespace cv diff --git a/modules/core/include/opencv2/core/fast_math.hpp b/modules/core/include/opencv2/core/fast_math.hpp index 7858d40..6ff31c2 100644 --- a/modules/core/include/opencv2/core/fast_math.hpp +++ b/modules/core/include/opencv2/core/fast_math.hpp @@ -70,10 +70,6 @@ # endif #endif -#ifdef HAVE_TEGRA_OPTIMIZATION -# include "tegra_round.hpp" -#endif - #if defined __GNUC__ && defined __arm__ && (defined __ARM_PCS_VFP || defined __ARM_VFPV3__ || defined __ARM_NEON__) && !defined __SOFTFP__ && !defined(__CUDACC__) // 1. general scheme #define ARM_ROUND(_value, _asm_string) \ @@ -112,9 +108,6 @@ cvRound( double value ) fistp t; } return t; -#elif ((defined _MSC_VER && defined _M_ARM) || defined CV_ICC || \ - defined __GNUC__) && defined HAVE_TEGRA_OPTIMIZATION - TEGRA_ROUND_DBL(value); #elif defined CV_ICC || defined __GNUC__ # if defined ARM_ROUND_DBL ARM_ROUND_DBL(value); @@ -200,9 +193,6 @@ CV_INLINE int cvRound(float value) fistp t; } return t; -#elif ((defined _MSC_VER && defined _M_ARM) || defined CV_ICC || \ - defined __GNUC__) && defined HAVE_TEGRA_OPTIMIZATION - TEGRA_ROUND_FLT(value); #elif defined CV_ICC || defined __GNUC__ # if defined ARM_ROUND_FLT ARM_ROUND_FLT(value); diff --git a/modules/core/include/opencv2/core/private.hpp b/modules/core/include/opencv2/core/private.hpp index a212ac1..d07727c 100644 --- a/modules/core/include/opencv2/core/private.hpp +++ b/modules/core/include/opencv2/core/private.hpp @@ -622,15 +622,6 @@ typedef enum CvStatus } CvStatus; -#ifdef HAVE_TEGRA_OPTIMIZATION -namespace tegra { - -CV_EXPORTS bool useTegra(); -CV_EXPORTS void setUseTegra(bool flag); - -} -#endif - #ifdef ENABLE_INSTRUMENTATION namespace cv { diff --git a/modules/core/src/arithm.cpp b/modules/core/src/arithm.cpp index 4572153..b03809d 100644 --- a/modules/core/src/arithm.cpp +++ b/modules/core/src/arithm.cpp @@ -931,59 +931,6 @@ void cv::subtract( InputArray _src1, InputArray _src2, OutputArray _dst, { CV_INSTRUMENT_REGION() -#ifdef HAVE_TEGRA_OPTIMIZATION - if (tegra::useTegra()) - { - int kind1 = _src1.kind(), kind2 = _src2.kind(); - Mat src1 = _src1.getMat(), src2 = _src2.getMat(); - bool src1Scalar = checkScalar(src1, _src2.type(), kind1, kind2); - bool src2Scalar = checkScalar(src2, _src1.type(), kind2, kind1); - - if (!src1Scalar && !src2Scalar && - src1.depth() == CV_8U && src2.type() == src1.type() && - src1.dims == 2 && src2.size() == src1.size() && - mask.empty()) - { - if (dtype < 0) - { - if (_dst.fixedType()) - { - dtype = _dst.depth(); - } - else - { - dtype = src1.depth(); - } - } - - dtype = CV_MAT_DEPTH(dtype); - - if (!_dst.fixedType() || dtype == _dst.depth()) - { - _dst.create(src1.size(), CV_MAKE_TYPE(dtype, src1.channels())); - - if (dtype == CV_16S) - { - Mat dst = _dst.getMat(); - if(tegra::subtract_8u8u16s(src1, src2, dst)) - return; - } - else if (dtype == CV_32F) - { - Mat dst = _dst.getMat(); - if(tegra::subtract_8u8u32f(src1, src2, dst)) - return; - } - else if (dtype == CV_8S) - { - Mat dst = _dst.getMat(); - if(tegra::subtract_8u8u8s(src1, src2, dst)) - return; - } - } - } - } -#endif arithm_op(_src1, _src2, _dst, mask, dtype, getSubTab(), false, 0, OCL_OP_SUB ); } diff --git a/modules/core/src/precomp.hpp b/modules/core/src/precomp.hpp index 3d6835f..1e26178 100644 --- a/modules/core/src/precomp.hpp +++ b/modules/core/src/precomp.hpp @@ -89,11 +89,7 @@ #include "arithm_core.hpp" #include "hal_replacement.hpp" -#ifdef HAVE_TEGRA_OPTIMIZATION -#include "opencv2/core/core_tegra.hpp" -#else #define GET_OPTIMIZED(func) (func) -#endif namespace cv { @@ -269,9 +265,6 @@ struct CoreTLSData //#endif useIPP(-1), useIPP_NE(-1) -#ifdef HAVE_TEGRA_OPTIMIZATION - ,useTegra(-1) -#endif #ifdef HAVE_OPENVX ,useOpenVX(-1) #endif @@ -285,9 +278,6 @@ struct CoreTLSData //#endif int useIPP; // 1 - use, 0 - do not use, -1 - auto/not initialized int useIPP_NE; // 1 - use, 0 - do not use, -1 - auto/not initialized -#ifdef HAVE_TEGRA_OPTIMIZATION - int useTegra; // 1 - use, 0 - do not use, -1 - auto/not initialized -#endif #ifdef HAVE_OPENVX int useOpenVX; // 1 - use, 0 - do not use, -1 - auto/not initialized #endif diff --git a/modules/core/src/system.cpp b/modules/core/src/system.cpp index 0f20248..1d8d855 100644 --- a/modules/core/src/system.cpp +++ b/modules/core/src/system.cpp @@ -619,9 +619,6 @@ void setUseOptimized( bool flag ) #ifdef HAVE_OPENCL ocl::setUseOpenCL(flag); #endif -#ifdef HAVE_TEGRA_OPTIMIZATION - ::tegra::setUseTegra(flag); -#endif } bool useOptimized(void) @@ -2140,34 +2137,4 @@ void setUseIPP_NE(bool flag) } // namespace cv -#ifdef HAVE_TEGRA_OPTIMIZATION - -namespace tegra { - -bool useTegra() -{ - cv::CoreTLSData* data = cv::getCoreTlsData().get(); - - if (data->useTegra < 0) - { - const char* pTegraEnv = getenv("OPENCV_TEGRA"); - if (pTegraEnv && (cv::String(pTegraEnv) == "disabled")) - data->useTegra = false; - else - data->useTegra = true; - } - - return (data->useTegra > 0); -} - -void setUseTegra(bool flag) -{ - cv::CoreTLSData* data = cv::getCoreTlsData().get(); - data->useTegra = flag; -} - -} // namespace tegra - -#endif - /* End of file. */ diff --git a/modules/features2d/src/fast.cpp b/modules/features2d/src/fast.cpp index 106e580..5299e14 100644 --- a/modules/features2d/src/fast.cpp +++ b/modules/features2d/src/fast.cpp @@ -497,10 +497,6 @@ void FAST(InputArray _img, std::vector& keypoints, int threshold, bool FAST_t<12>(_img, keypoints, threshold, nonmax_suppression); break; case FastFeatureDetector::TYPE_9_16: -#ifdef HAVE_TEGRA_OPTIMIZATION - if(tegra::useTegra() && tegra::FAST(_img, keypoints, threshold, nonmax_suppression)) - break; -#endif FAST_t<16>(_img, keypoints, threshold, nonmax_suppression); break; } diff --git a/modules/features2d/src/precomp.hpp b/modules/features2d/src/precomp.hpp index c3db78b..27feebc 100644 --- a/modules/features2d/src/precomp.hpp +++ b/modules/features2d/src/precomp.hpp @@ -53,8 +53,4 @@ #include -#ifdef HAVE_TEGRA_OPTIMIZATION -#include "opencv2/features2d/features2d_tegra.hpp" -#endif - #endif diff --git a/modules/highgui/src/precomp.hpp b/modules/highgui/src/precomp.hpp index 1d72a5d..cf23a39 100644 --- a/modules/highgui/src/precomp.hpp +++ b/modules/highgui/src/precomp.hpp @@ -68,10 +68,6 @@ #undef abs #endif -#ifdef HAVE_TEGRA_OPTIMIZATION -#include "opencv2/highgui/highgui_tegra.hpp" -#endif - /* Errors */ #define HG_OK 0 /* Don't bet on it! */ #define HG_BADNAME -1 /* Bad window or file name */ diff --git a/modules/imgproc/src/canny.cpp b/modules/imgproc/src/canny.cpp index 1d41372..e0753bd 100644 --- a/modules/imgproc/src/canny.cpp +++ b/modules/imgproc/src/canny.cpp @@ -996,11 +996,6 @@ void Canny( InputArray _src, OutputArray _dst, aperture_size, L2gradient ) ) -#ifdef HAVE_TEGRA_OPTIMIZATION - if (tegra::useTegra() && tegra::canny(src, dst, low_thresh, high_thresh, aperture_size, L2gradient)) - return; -#endif - CV_IPP_RUN_FAST(ipp_Canny(src, Mat(), Mat(), dst, (float)low_thresh, (float)high_thresh, L2gradient, aperture_size)) if (L2gradient) diff --git a/modules/imgproc/src/corner.cpp b/modules/imgproc/src/corner.cpp index e784fa2..cfb5681 100644 --- a/modules/imgproc/src/corner.cpp +++ b/modules/imgproc/src/corner.cpp @@ -247,10 +247,6 @@ cornerEigenValsVecs( const Mat& src, Mat& eigenv, int block_size, int aperture_size, int op_type, double k=0., int borderType=BORDER_DEFAULT ) { -#ifdef HAVE_TEGRA_OPTIMIZATION - if (tegra::useTegra() && tegra::cornerEigenValsVecs(src, eigenv, block_size, aperture_size, op_type, k, borderType)) - return; -#endif #if CV_TRY_AVX bool haveAvx = CV_CPU_HAS_SUPPORT_AVX; #endif diff --git a/modules/imgproc/src/deriv.cpp b/modules/imgproc/src/deriv.cpp index 3e464ba..16e2278 100644 --- a/modules/imgproc/src/deriv.cpp +++ b/modules/imgproc/src/deriv.cpp @@ -808,20 +808,6 @@ void cv::Laplacian( InputArray _src, OutputArray _dst, int ddepth, int ksize, CV_IPP_RUN(!(cv::ocl::isOpenCLActivated() && _dst.isUMat()), ipp_Laplacian(_src, _dst, ksize, scale, delta, borderType)); - -#ifdef HAVE_TEGRA_OPTIMIZATION - if (tegra::useTegra() && scale == 1.0 && delta == 0) - { - Mat src = _src.getMat(), dst = _dst.getMat(); - if (ksize == 1 && tegra::laplace1(src, dst, borderType)) - return; - if (ksize == 3 && tegra::laplace3(src, dst, borderType)) - return; - if (ksize == 5 && tegra::laplace5(src, dst, borderType)) - return; - } -#endif - if( ksize == 1 || ksize == 3 ) { float K[2][9] = diff --git a/modules/imgproc/src/precomp.hpp b/modules/imgproc/src/precomp.hpp index 55241d9..d0d02e1 100644 --- a/modules/imgproc/src/precomp.hpp +++ b/modules/imgproc/src/precomp.hpp @@ -61,11 +61,7 @@ #include #include -#ifdef HAVE_TEGRA_OPTIMIZATION -#include "opencv2/imgproc/imgproc_tegra.hpp" -#else #define GET_OPTIMIZED(func) (func) -#endif /* helper tables */ extern const uchar icvSaturate8u_cv[]; diff --git a/modules/imgproc/src/pyramids.cpp b/modules/imgproc/src/pyramids.cpp index 7ece7f5..af24d38 100644 --- a/modules/imgproc/src/pyramids.cpp +++ b/modules/imgproc/src/pyramids.cpp @@ -1355,11 +1355,6 @@ void cv::pyrDown( InputArray _src, OutputArray _dst, const Size& _dsz, int borde CALL_HAL(pyrDown, cv_hal_pyrdown, src.data, src.step, src.cols, src.rows, dst.data, dst.step, dst.cols, dst.rows, depth, src.channels(), borderType); -#ifdef HAVE_TEGRA_OPTIMIZATION - if(borderType == BORDER_DEFAULT && tegra::useTegra() && tegra::pyrDown(src, dst)) - return; -#endif - #ifdef HAVE_IPP bool isolated = (borderType & BORDER_ISOLATED) != 0; int borderTypeNI = borderType & ~BORDER_ISOLATED; @@ -1463,11 +1458,6 @@ void cv::pyrUp( InputArray _src, OutputArray _dst, const Size& _dsz, int borderT Mat dst = _dst.getMat(); int depth = src.depth(); -#ifdef HAVE_TEGRA_OPTIMIZATION - if(borderType == BORDER_DEFAULT && tegra::useTegra() && tegra::pyrUp(src, dst)) - return; -#endif - #ifdef HAVE_IPP bool isolated = (borderType & BORDER_ISOLATED) != 0; int borderTypeNI = borderType & ~BORDER_ISOLATED; diff --git a/modules/imgproc/src/smooth.cpp b/modules/imgproc/src/smooth.cpp index 72876d6..9b1c9fa 100644 --- a/modules/imgproc/src/smooth.cpp +++ b/modules/imgproc/src/smooth.cpp @@ -4566,11 +4566,6 @@ void cv::medianBlur( InputArray _src0, OutputArray _dst, int ksize ) CV_IPP_RUN_FAST(ipp_medianFilter(src0, dst, ksize)); -#ifdef HAVE_TEGRA_OPTIMIZATION - if (tegra::useTegra() && tegra::medianBlur(src0, dst, ksize)) - return; -#endif - bool useSortNet = ksize == 3 || (ksize == 5 #if !(CV_SIMD128) && ( src0.depth() > CV_8U || src0.channels() == 2 || src0.channels() > 4 ) diff --git a/modules/imgproc/src/templmatch.cpp b/modules/imgproc/src/templmatch.cpp index 302e26e..b21a485 100644 --- a/modules/imgproc/src/templmatch.cpp +++ b/modules/imgproc/src/templmatch.cpp @@ -1118,11 +1118,6 @@ void cv::matchTemplate( InputArray _img, InputArray _templ, OutputArray _result, _result.create(corrSize, CV_32F); Mat result = _result.getMat(); -#ifdef HAVE_TEGRA_OPTIMIZATION - if (tegra::useTegra() && tegra::matchTemplate(img, templ, result, method)) - return; -#endif - CV_IPP_RUN_FAST(ipp_matchTemplate(img, templ, result, method)) crossCorr( img, templ, result, result.size(), result.type(), Point(0,0), 0, 0); diff --git a/modules/imgproc/src/thresh.cpp b/modules/imgproc/src/thresh.cpp index 520a9c8..375f1f7 100644 --- a/modules/imgproc/src/thresh.cpp +++ b/modules/imgproc/src/thresh.cpp @@ -136,11 +136,6 @@ thresh_8u( const Mat& _src, Mat& _dst, uchar thresh, uchar maxval, int type ) src_step = dst_step = roi.width; } -#ifdef HAVE_TEGRA_OPTIMIZATION - if (tegra::useTegra() && tegra::thresh_8u(_src, _dst, roi.width, roi.height, thresh, maxval, type)) - return; -#endif - #if defined(HAVE_IPP) CV_IPP_CHECK() { @@ -356,8 +351,6 @@ thresh_16u(const Mat& _src, Mat& _dst, ushort thresh, ushort maxval, int type) src_step = dst_step = roi.width; } - // HAVE_TEGRA_OPTIMIZATION not supported - // HAVE_IPP not supported const ushort* src = _src.ptr(); @@ -500,11 +493,6 @@ thresh_16s( const Mat& _src, Mat& _dst, short thresh, short maxval, int type ) src_step = dst_step = roi.width; } -#ifdef HAVE_TEGRA_OPTIMIZATION - if (tegra::useTegra() && tegra::thresh_16s(_src, _dst, roi.width, roi.height, thresh, maxval, type)) - return; -#endif - #if defined(HAVE_IPP) CV_IPP_CHECK() { @@ -697,11 +685,6 @@ thresh_32f( const Mat& _src, Mat& _dst, float thresh, float maxval, int type ) roi.height = 1; } -#ifdef HAVE_TEGRA_OPTIMIZATION - if (tegra::useTegra() && tegra::thresh_32f(_src, _dst, roi.width, roi.height, thresh, maxval, type)) - return; -#endif - #if defined(HAVE_IPP) CV_IPP_CHECK() { diff --git a/modules/objdetect/src/cascadedetect.cpp b/modules/objdetect/src/cascadedetect.cpp index 6c98eb9..79af457 100644 --- a/modules/objdetect/src/cascadedetect.cpp +++ b/modules/objdetect/src/cascadedetect.cpp @@ -969,10 +969,6 @@ Ptr CascadeClassifierImpl::getMaskGenerato Ptr createFaceDetectionMaskGenerator() { -#ifdef HAVE_TEGRA_OPTIMIZATION - if (tegra::useTegra()) - return tegra::getCascadeClassifierMaskGenerator(); -#endif return Ptr(); } diff --git a/modules/objdetect/src/precomp.hpp b/modules/objdetect/src/precomp.hpp index 448d8b1..cbefc39 100644 --- a/modules/objdetect/src/precomp.hpp +++ b/modules/objdetect/src/precomp.hpp @@ -50,8 +50,4 @@ #include "opencv2/core/ocl.hpp" #include "opencv2/core/private.hpp" -#ifdef HAVE_TEGRA_OPTIMIZATION -#include "opencv2/objdetect/objdetect_tegra.hpp" -#endif - #endif diff --git a/modules/photo/src/denoising.cpp b/modules/photo/src/denoising.cpp index ee9e573..e81a53b 100644 --- a/modules/photo/src/denoising.cpp +++ b/modules/photo/src/denoising.cpp @@ -131,11 +131,6 @@ void cv::fastNlMeansDenoising( InputArray _src, OutputArray _dst, const std::vec switch (normType) { case NORM_L2: -#ifdef HAVE_TEGRA_OPTIMIZATION - if(hn == 1 && tegra::useTegra() && - tegra::fastNlMeansDenoising(src, dst, h[0], templateWindowSize, searchWindowSize)) - return; -#endif switch (depth) { case CV_8U: fastNlMeansDenoising_(src, dst, h, diff --git a/modules/photo/src/precomp.hpp b/modules/photo/src/precomp.hpp index 4355f13..1834881 100644 --- a/modules/photo/src/precomp.hpp +++ b/modules/photo/src/precomp.hpp @@ -49,8 +49,4 @@ #include "opencv2/core/ocl.hpp" #include "opencv2/imgproc.hpp" -#ifdef HAVE_TEGRA_OPTIMIZATION -#include "opencv2/photo/photo_tegra.hpp" -#endif - #endif diff --git a/modules/stitching/src/blenders.cpp b/modules/stitching/src/blenders.cpp index ee665b3..94047e4 100644 --- a/modules/stitching/src/blenders.cpp +++ b/modules/stitching/src/blenders.cpp @@ -625,12 +625,6 @@ void normalizeUsingWeightMap(InputArray _weight, InputOutputArray _src) { Mat src; Mat weight; -#ifdef HAVE_TEGRA_OPTIMIZATION - src = _src.getMat(); - weight = _weight.getMat(); - if(tegra::useTegra() && tegra::normalizeUsingWeightMap(weight, src)) - return; -#endif #ifdef HAVE_OPENCL if ( !cv::ocl::isOpenCLActivated() || @@ -697,12 +691,6 @@ void createWeightMap(InputArray mask, float sharpness, InputOutputArray weight) void createLaplacePyr(InputArray img, int num_levels, std::vector &pyr) { -#ifdef HAVE_TEGRA_OPTIMIZATION - cv::Mat imgMat = img.getMat(); - if(tegra::useTegra() && tegra::createLaplacePyr(imgMat, num_levels, pyr)) - return; -#endif - pyr.resize(num_levels + 1); if(img.depth() == CV_8U) diff --git a/modules/stitching/src/matchers.cpp b/modules/stitching/src/matchers.cpp index 140d4da..6b9d75c 100644 --- a/modules/stitching/src/matchers.cpp +++ b/modules/stitching/src/matchers.cpp @@ -187,11 +187,6 @@ void CpuMatcher::match(const ImageFeatures &features1, const ImageFeatures &feat CV_Assert(features1.descriptors.type() == features2.descriptors.type()); CV_Assert(features2.descriptors.depth() == CV_8U || features2.descriptors.depth() == CV_32F); -#ifdef HAVE_TEGRA_OPTIMIZATION - if (tegra::useTegra() && tegra::match2nearest(features1, features2, matches_info, match_conf_)) - return; -#endif - matches_info.matches.clear(); Ptr matcher; diff --git a/modules/stitching/src/precomp.hpp b/modules/stitching/src/precomp.hpp index eff78cf..ef3740e 100644 --- a/modules/stitching/src/precomp.hpp +++ b/modules/stitching/src/precomp.hpp @@ -95,10 +95,6 @@ #include "opencv2/core/private.hpp" -#ifdef HAVE_TEGRA_OPTIMIZATION -# include "opencv2/stitching/stitching_tegra.hpp" -#endif - #include "util_log.hpp" #endif diff --git a/modules/ts/src/ts_func.cpp b/modules/ts/src/ts_func.cpp index a639dc2..8c5d6f3 100644 --- a/modules/ts/src/ts_func.cpp +++ b/modules/ts/src/ts_func.cpp @@ -3,10 +3,6 @@ #include #include "opencv2/imgproc/types_c.h" -#ifdef HAVE_TEGRA_OPTIMIZATION -#include "tegra.hpp" -#endif - using namespace cv; namespace cvtest @@ -3101,12 +3097,6 @@ void printVersionInfo(bool useStdOut) ::testing::Test::RecordProperty("cv_cpu_features", cpu_features); if (useStdOut) std::cout << "CPU features: " << cpu_features << std::endl; -#ifdef HAVE_TEGRA_OPTIMIZATION - const char * tegra_optimization = tegra::useTegra() && tegra::isDeviceSupported() ? "enabled" : "disabled"; - ::testing::Test::RecordProperty("cv_tegra_optimization", tegra_optimization); - if (useStdOut) std::cout << "Tegra optimization: " << tegra_optimization << std::endl; -#endif - #ifdef HAVE_IPP const char * ipp_optimization = cv::ipp::useIPP()? "enabled" : "disabled"; ::testing::Test::RecordProperty("cv_ipp_optimization", ipp_optimization); diff --git a/modules/video/src/lkpyramid.cpp b/modules/video/src/lkpyramid.cpp index 48f896d..d65f82d 100644 --- a/modules/video/src/lkpyramid.cpp +++ b/modules/video/src/lkpyramid.cpp @@ -60,11 +60,6 @@ static void calcSharrDeriv(const cv::Mat& src, cv::Mat& dst) CV_Assert(depth == CV_8U); dst.create(rows, cols, CV_MAKETYPE(DataType::depth, cn*2)); -#ifdef HAVE_TEGRA_OPTIMIZATION - if (tegra::useTegra() && tegra::calcSharrDeriv(src, dst)) - return; -#endif - int x, y, delta = (int)alignSize((cols + 2)*cn, 16); AutoBuffer _tempBuf(delta*2 + 64); deriv_type *trow0 = alignPtr(_tempBuf + cn, 16), *trow1 = alignPtr(trow0 + delta, 16); @@ -1378,12 +1373,7 @@ void SparsePyrLKOpticalFlowImpl::calc( InputArray _prevImg, InputArray _nextImg, CV_Assert(prevPyr[level * lvlStep1].size() == nextPyr[level * lvlStep2].size()); CV_Assert(prevPyr[level * lvlStep1].type() == nextPyr[level * lvlStep2].type()); -#ifdef HAVE_TEGRA_OPTIMIZATION - typedef tegra::LKTrackerInvoker LKTrackerInvoker; -#else typedef cv::detail::LKTrackerInvoker LKTrackerInvoker; -#endif - parallel_for_(Range(0, npoints), LKTrackerInvoker(prevPyr[level * lvlStep1], derivI, nextPyr[level * lvlStep2], prevPts, nextPts, status, err, diff --git a/modules/video/src/precomp.hpp b/modules/video/src/precomp.hpp index 5f1bbf8..aac0c57 100644 --- a/modules/video/src/precomp.hpp +++ b/modules/video/src/precomp.hpp @@ -49,8 +49,4 @@ #include "opencv2/core/ocl.hpp" #include "opencv2/core.hpp" -#ifdef HAVE_TEGRA_OPTIMIZATION -#include "opencv2/video/video_tegra.hpp" -#endif - #endif -- 2.7.4