1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-31 00:03:03 +04:00

Merge pull request #25197 from invarrow:invbranch-cleanup

Remove OpenVX  #25197

resolves https://github.com/opencv/opencv/issues/24995
OpenCV cleanup https://github.com/opencv/opencv/issues/25007
This commit is contained in:
Abdul Rahman ArM
2024-03-26 17:47:18 +05:30
committed by GitHub
parent 5319772a56
commit 55426ee195
46 changed files with 2 additions and 7362 deletions
-1
View File
@@ -3404,6 +3404,5 @@ struct ParamType<_Tp, typename std::enable_if< std::is_enum<_Tp>::value >::type>
#include "opencv2/core/cvstd.inl.hpp"
#include "opencv2/core/utility.hpp"
#include "opencv2/core/optim.hpp"
#include "opencv2/core/ovx.hpp"
#endif /*OPENCV_CORE_HPP*/
@@ -1,48 +0,0 @@
// This file is part of OpenCV project.
// It is subject to the license terms in the LICENSE file found in the top-level directory
// of this distribution and at http://opencv.org/license.html.
// Copyright (C) 2016, Intel Corporation, all rights reserved.
// Third party copyrights are property of their respective owners.
// OpenVX related definitions and declarations
#pragma once
#ifndef OPENCV_OVX_DEFS_HPP
#define OPENCV_OVX_DEFS_HPP
#include "cvconfig.h"
// utility macro for running OpenVX-based implementations
#ifdef HAVE_OPENVX
#define IVX_HIDE_INFO_WARNINGS
#define IVX_USE_OPENCV
#include "ivx.hpp"
namespace cv{
namespace ovx{
// Get common thread local OpenVX context
CV_EXPORTS_W ivx::Context& getOpenVXContext();
template <int kernel_id> inline bool skipSmallImages(int w, int h) { return w*h < 3840 * 2160; }
}}
#define CV_OVX_RUN(condition, func, ...) \
if (cv::useOpenVX() && (condition) && func) \
{ \
return __VA_ARGS__; \
}
#else
#define CV_OVX_RUN(condition, func, ...)
#endif // HAVE_OPENVX
// Throw an error in debug mode or try another implementation in release
#ifdef _DEBUG
#define VX_DbgThrow(s) CV_Error(cv::Error::StsInternal, (s))
#else
#define VX_DbgThrow(s) return false
#endif
#endif // OPENCV_OVX_DEFS_HPP
-28
View File
@@ -1,28 +0,0 @@
// This file is part of OpenCV project.
// It is subject to the license terms in the LICENSE file found in the top-level directory
// of this distribution and at http://opencv.org/license.html.
// Copyright (C) 2016, Intel Corporation, all rights reserved.
// Third party copyrights are property of their respective owners.
// OpenVX related definitions and declarations
#pragma once
#ifndef OPENCV_OVX_HPP
#define OPENCV_OVX_HPP
#include "cvdef.h"
namespace cv
{
/// Check if use of OpenVX is possible
CV_EXPORTS_W bool haveOpenVX();
/// Check if use of OpenVX is enabled
CV_EXPORTS_W bool useOpenVX();
/// Enable/disable use of OpenVX
CV_EXPORTS_W void setUseOpenVX(bool flag);
} // namespace cv
#endif // OPENCV_OVX_HPP
@@ -106,7 +106,6 @@ enum RegionLocationFlag {
REGION_FLAG_IMPL_IPP = (1 << 16), ///< region is part of IPP code path
REGION_FLAG_IMPL_OPENCL = (2 << 16), ///< region is part of OpenCL code path
REGION_FLAG_IMPL_OPENVX = (3 << 16), ///< region is part of OpenVX code path
REGION_FLAG_IMPL_MASK = (15 << 16),
@@ -79,9 +79,6 @@ struct RegionStatistics
#ifdef HAVE_OPENCL
int64 durationImplOpenCL;
#endif
#ifdef HAVE_OPENVX
int64 durationImplOpenVX;
#endif
RegionStatistics() :
currentSkippedRegions(0),
@@ -91,9 +88,6 @@ struct RegionStatistics
#endif
#ifdef HAVE_OPENCL
,durationImplOpenCL(0)
#endif
#ifdef HAVE_OPENVX
,durationImplOpenVX(0)
#endif
{}
@@ -106,9 +100,6 @@ struct RegionStatistics
#endif
#ifdef HAVE_OPENCL
result.durationImplOpenCL = durationImplOpenCL; durationImplOpenCL = 0;
#endif
#ifdef HAVE_OPENVX
result.durationImplOpenVX = durationImplOpenVX; durationImplOpenVX = 0;
#endif
}
@@ -121,9 +112,6 @@ struct RegionStatistics
#endif
#ifdef HAVE_OPENCL
durationImplOpenCL += stat.durationImplOpenCL;
#endif
#ifdef HAVE_OPENVX
durationImplOpenVX += stat.durationImplOpenVX;
#endif
}
@@ -135,9 +123,6 @@ struct RegionStatistics
#endif
#ifdef HAVE_OPENCL
durationImplOpenCL = (int64)(durationImplOpenCL * c);
#endif
#ifdef HAVE_OPENVX
durationImplOpenVX = (int64)(durationImplOpenVX * c);
#endif
}
};
@@ -152,9 +137,6 @@ std::ostream& operator<<(std::ostream& out, const RegionStatistics& stat)
#endif
#ifdef HAVE_OPENCL
<< " durationImplOpenCL=" << stat.durationImplOpenCL
#endif
#ifdef HAVE_OPENVX
<< " durationImplOpenVX=" << stat.durationImplOpenVX
#endif
;
return out;
@@ -169,9 +151,6 @@ struct RegionStatisticsStatus
#ifdef HAVE_OPENCL
int ignoreDepthImplOpenCL;
#endif
#ifdef HAVE_OPENVX
int ignoreDepthImplOpenVX;
#endif
RegionStatisticsStatus() { reset(); }
@@ -183,9 +162,6 @@ struct RegionStatisticsStatus
#endif
#ifdef HAVE_OPENCL
ignoreDepthImplOpenCL = 0;
#endif
#ifdef HAVE_OPENVX
ignoreDepthImplOpenVX = 0;
#endif
}
@@ -199,9 +175,6 @@ struct RegionStatisticsStatus
#endif
#ifdef HAVE_OPENCL
ignoreDepthImplOpenCL = src.ignoreDepthImplOpenCL ? 1 : 0;
#endif
#ifdef HAVE_OPENVX
ignoreDepthImplOpenVX = src.ignoreDepthImplOpenVX ? 1 : 0;
#endif
}
@@ -222,10 +195,6 @@ std::ostream& operator<<(std::ostream& out, const RegionStatisticsStatus& s)
#ifdef HAVE_OPENCL
if (s.ignoreDepthImplOpenCL)
out << " OpenCL=" << s.ignoreDepthImplOpenCL;
#endif
#ifdef HAVE_OPENVX
if (s.ignoreDepthImplOpenVX)
out << " OpenVX=" << s.ignoreDepthImplOpenVX;
#endif
out << "}";
return out;
@@ -389,8 +358,7 @@ public:
enum OptimizationPath {
CODE_PATH_PLAIN = 0,
CODE_PATH_IPP,
CODE_PATH_OPENCL,
CODE_PATH_OPENVX
CODE_PATH_OPENCL
};
#ifdef OPENCV_WITH_ITT