node-native-win-utils 1.4.0 → 2.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +29 -82
- package/binding.gyp +2 -0
- package/dist/dirnameLocal.cjs +4 -0
- package/dist/dirnameLocal.d.cts +1 -0
- package/dist/dirnameLocal.d.mts +1 -0
- package/dist/dirnameLocal.mjs +2 -0
- package/dist/{index.js → index.cjs} +83 -16
- package/dist/{index.d.ts → index.d.cts} +68 -17
- package/dist/index.d.mts +230 -0
- package/dist/index.mjs +212 -0
- package/dist/keyCodes.d.mts +101 -0
- package/dist/keyCodes.mjs +201 -0
- package/node22.json +16 -0
- package/package.json +19 -9
- package/prebuilds/win32-x64/node-native-win-utils.node +0 -0
- package/src/cpp/keyboard.cpp +141 -140
- package/src/cpp/main.cpp +9 -3
- package/src/cpp/{capturewindow.cpp → screenshot.cpp} +174 -2
- package/src/dirnameLocal.mts +3 -0
- package/src/index.mts +455 -0
- package/src/keyCodes.mts +203 -0
- package/dllCopy.js +0 -14
- package/include/opencv2/core/affine.hpp +0 -678
- package/include/opencv2/core/async.hpp +0 -105
- package/include/opencv2/core/base.hpp +0 -664
- package/include/opencv2/core/bindings_utils.hpp +0 -325
- package/include/opencv2/core/bufferpool.hpp +0 -40
- package/include/opencv2/core/check.hpp +0 -170
- package/include/opencv2/core/core.hpp +0 -48
- package/include/opencv2/core/core_c.h +0 -3128
- package/include/opencv2/core/cuda/block.hpp +0 -211
- package/include/opencv2/core/cuda/border_interpolate.hpp +0 -722
- package/include/opencv2/core/cuda/color.hpp +0 -309
- package/include/opencv2/core/cuda/common.hpp +0 -131
- package/include/opencv2/core/cuda/datamov_utils.hpp +0 -113
- package/include/opencv2/core/cuda/detail/color_detail.hpp +0 -2018
- package/include/opencv2/core/cuda/detail/reduce.hpp +0 -365
- package/include/opencv2/core/cuda/detail/reduce_key_val.hpp +0 -502
- package/include/opencv2/core/cuda/detail/transform_detail.hpp +0 -392
- package/include/opencv2/core/cuda/detail/type_traits_detail.hpp +0 -191
- package/include/opencv2/core/cuda/detail/vec_distance_detail.hpp +0 -121
- package/include/opencv2/core/cuda/dynamic_smem.hpp +0 -88
- package/include/opencv2/core/cuda/emulation.hpp +0 -269
- package/include/opencv2/core/cuda/filters.hpp +0 -293
- package/include/opencv2/core/cuda/funcattrib.hpp +0 -79
- package/include/opencv2/core/cuda/functional.hpp +0 -805
- package/include/opencv2/core/cuda/limits.hpp +0 -128
- package/include/opencv2/core/cuda/reduce.hpp +0 -209
- package/include/opencv2/core/cuda/saturate_cast.hpp +0 -292
- package/include/opencv2/core/cuda/scan.hpp +0 -258
- package/include/opencv2/core/cuda/simd_functions.hpp +0 -869
- package/include/opencv2/core/cuda/transform.hpp +0 -75
- package/include/opencv2/core/cuda/type_traits.hpp +0 -90
- package/include/opencv2/core/cuda/utility.hpp +0 -230
- package/include/opencv2/core/cuda/vec_distance.hpp +0 -232
- package/include/opencv2/core/cuda/vec_math.hpp +0 -923
- package/include/opencv2/core/cuda/vec_traits.hpp +0 -288
- package/include/opencv2/core/cuda/warp.hpp +0 -139
- package/include/opencv2/core/cuda/warp_reduce.hpp +0 -76
- package/include/opencv2/core/cuda/warp_shuffle.hpp +0 -162
- package/include/opencv2/core/cuda.hpp +0 -1279
- package/include/opencv2/core/cuda.inl.hpp +0 -763
- package/include/opencv2/core/cuda_stream_accessor.hpp +0 -86
- package/include/opencv2/core/cuda_types.hpp +0 -144
- package/include/opencv2/core/cv_cpu_dispatch.h +0 -381
- package/include/opencv2/core/cv_cpu_helper.h +0 -550
- package/include/opencv2/core/cvdef.h +0 -973
- package/include/opencv2/core/cvstd.hpp +0 -190
- package/include/opencv2/core/cvstd.inl.hpp +0 -197
- package/include/opencv2/core/cvstd_wrapper.hpp +0 -154
- package/include/opencv2/core/detail/async_promise.hpp +0 -71
- package/include/opencv2/core/detail/dispatch_helper.impl.hpp +0 -49
- package/include/opencv2/core/detail/exception_ptr.hpp +0 -27
- package/include/opencv2/core/directx.hpp +0 -184
- package/include/opencv2/core/dualquaternion.hpp +0 -979
- package/include/opencv2/core/dualquaternion.inl.hpp +0 -487
- package/include/opencv2/core/eigen.hpp +0 -402
- package/include/opencv2/core/fast_math.hpp +0 -433
- package/include/opencv2/core/hal/hal.hpp +0 -256
- package/include/opencv2/core/hal/interface.h +0 -190
- package/include/opencv2/core/hal/intrin.hpp +0 -939
- package/include/opencv2/core/hal/intrin_avx.hpp +0 -3177
- package/include/opencv2/core/hal/intrin_avx512.hpp +0 -3090
- package/include/opencv2/core/hal/intrin_cpp.hpp +0 -3321
- package/include/opencv2/core/hal/intrin_forward.hpp +0 -191
- package/include/opencv2/core/hal/intrin_lasx.hpp +0 -3236
- package/include/opencv2/core/hal/intrin_msa.hpp +0 -1887
- package/include/opencv2/core/hal/intrin_neon.hpp +0 -2610
- package/include/opencv2/core/hal/intrin_rvv.hpp +0 -3320
- package/include/opencv2/core/hal/intrin_rvv071.hpp +0 -2545
- package/include/opencv2/core/hal/intrin_rvv_scalable.hpp +0 -2080
- package/include/opencv2/core/hal/intrin_sse.hpp +0 -3467
- package/include/opencv2/core/hal/intrin_sse_em.hpp +0 -180
- package/include/opencv2/core/hal/intrin_vsx.hpp +0 -1608
- package/include/opencv2/core/hal/intrin_wasm.hpp +0 -2782
- package/include/opencv2/core/hal/msa_macros.h +0 -1558
- package/include/opencv2/core/hal/simd_utils.impl.hpp +0 -186
- package/include/opencv2/core/llapi/llapi.h +0 -102
- package/include/opencv2/core/mat.hpp +0 -3775
- package/include/opencv2/core/mat.inl.hpp +0 -3422
- package/include/opencv2/core/matx.hpp +0 -1536
- package/include/opencv2/core/neon_utils.hpp +0 -128
- package/include/opencv2/core/ocl.hpp +0 -917
- package/include/opencv2/core/ocl_genbase.hpp +0 -69
- package/include/opencv2/core/opencl/ocl_defs.hpp +0 -82
- package/include/opencv2/core/opencl/opencl_info.hpp +0 -212
- package/include/opencv2/core/opencl/opencl_svm.hpp +0 -81
- package/include/opencv2/core/opencl/runtime/autogenerated/opencl_clblas.hpp +0 -602
- package/include/opencv2/core/opencl/runtime/autogenerated/opencl_clfft.hpp +0 -146
- package/include/opencv2/core/opencl/runtime/autogenerated/opencl_core.hpp +0 -371
- package/include/opencv2/core/opencl/runtime/autogenerated/opencl_core_wrappers.hpp +0 -272
- package/include/opencv2/core/opencl/runtime/autogenerated/opencl_gl.hpp +0 -62
- package/include/opencv2/core/opencl/runtime/autogenerated/opencl_gl_wrappers.hpp +0 -42
- package/include/opencv2/core/opencl/runtime/opencl_clblas.hpp +0 -53
- package/include/opencv2/core/opencl/runtime/opencl_clfft.hpp +0 -53
- package/include/opencv2/core/opencl/runtime/opencl_core.hpp +0 -84
- package/include/opencv2/core/opencl/runtime/opencl_core_wrappers.hpp +0 -47
- package/include/opencv2/core/opencl/runtime/opencl_gl.hpp +0 -53
- package/include/opencv2/core/opencl/runtime/opencl_gl_wrappers.hpp +0 -47
- package/include/opencv2/core/opencl/runtime/opencl_svm_20.hpp +0 -48
- package/include/opencv2/core/opencl/runtime/opencl_svm_definitions.hpp +0 -42
- package/include/opencv2/core/opencl/runtime/opencl_svm_hsa_extension.hpp +0 -166
- package/include/opencv2/core/opengl.hpp +0 -733
- package/include/opencv2/core/openvx/ovx_defs.hpp +0 -48
- package/include/opencv2/core/operations.hpp +0 -610
- package/include/opencv2/core/optim.hpp +0 -302
- package/include/opencv2/core/ovx.hpp +0 -28
- package/include/opencv2/core/parallel/backend/parallel_for.openmp.hpp +0 -72
- package/include/opencv2/core/parallel/backend/parallel_for.tbb.hpp +0 -153
- package/include/opencv2/core/parallel/parallel_backend.hpp +0 -90
- package/include/opencv2/core/persistence.hpp +0 -1350
- package/include/opencv2/core/private/cv_cpu_include_simd_declarations.hpp +0 -30
- package/include/opencv2/core/private.cuda.hpp +0 -169
- package/include/opencv2/core/private.hpp +0 -896
- package/include/opencv2/core/quaternion.hpp +0 -1696
- package/include/opencv2/core/quaternion.inl.hpp +0 -1063
- package/include/opencv2/core/saturate.hpp +0 -180
- package/include/opencv2/core/simd_intrinsics.hpp +0 -87
- package/include/opencv2/core/softfloat.hpp +0 -514
- package/include/opencv2/core/sse_utils.hpp +0 -652
- package/include/opencv2/core/traits.hpp +0 -417
- package/include/opencv2/core/types.hpp +0 -2457
- package/include/opencv2/core/types_c.h +0 -2126
- package/include/opencv2/core/utility.hpp +0 -1229
- package/include/opencv2/core/utils/allocator_stats.hpp +0 -29
- package/include/opencv2/core/utils/allocator_stats.impl.hpp +0 -158
- package/include/opencv2/core/utils/buffer_area.private.hpp +0 -136
- package/include/opencv2/core/utils/configuration.private.hpp +0 -22
- package/include/opencv2/core/utils/filesystem.hpp +0 -82
- package/include/opencv2/core/utils/filesystem.private.hpp +0 -66
- package/include/opencv2/core/utils/fp_control.private.hpp +0 -29
- package/include/opencv2/core/utils/fp_control_utils.hpp +0 -69
- package/include/opencv2/core/utils/instrumentation.hpp +0 -125
- package/include/opencv2/core/utils/lock.private.hpp +0 -119
- package/include/opencv2/core/utils/logger.defines.hpp +0 -42
- package/include/opencv2/core/utils/logger.hpp +0 -218
- package/include/opencv2/core/utils/logtag.hpp +0 -28
- package/include/opencv2/core/utils/plugin_loader.private.hpp +0 -165
- package/include/opencv2/core/utils/tls.hpp +0 -235
- package/include/opencv2/core/utils/trace.hpp +0 -252
- package/include/opencv2/core/utils/trace.private.hpp +0 -421
- package/include/opencv2/core/va_intel.hpp +0 -75
- package/include/opencv2/core/version.hpp +0 -26
- package/include/opencv2/core/vsx_utils.hpp +0 -1047
- package/include/opencv2/core.hpp +0 -3365
- package/include/opencv2/imgcodecs/imgcodecs.hpp +0 -48
- package/include/opencv2/imgcodecs/imgcodecs_c.h +0 -1
- package/include/opencv2/imgcodecs/ios.h +0 -59
- package/include/opencv2/imgcodecs/legacy/constants_c.h +0 -54
- package/include/opencv2/imgcodecs/macosx.h +0 -20
- package/include/opencv2/imgcodecs.hpp +0 -407
- package/include/opencv2/imgproc/bindings.hpp +0 -34
- package/include/opencv2/imgproc/detail/gcgraph.hpp +0 -395
- package/include/opencv2/imgproc/hal/hal.hpp +0 -246
- package/include/opencv2/imgproc/hal/interface.h +0 -46
- package/include/opencv2/imgproc/imgproc.hpp +0 -48
- package/include/opencv2/imgproc/imgproc_c.h +0 -1177
- package/include/opencv2/imgproc/segmentation.hpp +0 -141
- package/include/opencv2/imgproc/types_c.h +0 -659
- package/include/opencv2/imgproc.hpp +0 -5035
- package/include/opencv2/opencv_modules.hpp +0 -17
- package/include/tesseract/baseapi.h +0 -820
- package/include/tesseract/capi.h +0 -485
- package/include/tesseract/export.h +0 -37
- package/include/tesseract/ltrresultiterator.h +0 -235
- package/include/tesseract/ocrclass.h +0 -158
- package/include/tesseract/osdetect.h +0 -139
- package/include/tesseract/pageiterator.h +0 -364
- package/include/tesseract/publictypes.h +0 -281
- package/include/tesseract/renderer.h +0 -334
- package/include/tesseract/resultiterator.h +0 -250
- package/include/tesseract/tesseract.h +0 -40
- package/include/tesseract/unichar.h +0 -174
- package/include/tesseract/version.h +0 -34
- package/include/tesseract/version.h.in +0 -34
- package/libs/libjpeg-turbo.lib +0 -0
- package/libs/libpng.lib +0 -0
- package/libs/opencv_core470.lib +0 -0
- package/libs/opencv_imgcodecs470.lib +0 -0
- package/libs/opencv_imgproc470.lib +0 -0
- package/libs/tesseract.lib +0 -0
- package/libs/zlib.lib +0 -0
- /package/dist/{keyCodes.js → keyCodes.cjs} +0 -0
- /package/dist/{keyCodes.d.ts → keyCodes.d.cts} +0 -0
|
@@ -1,421 +0,0 @@
|
|
|
1
|
-
// This file is part of OpenCV project.
|
|
2
|
-
// It is subject to the license terms in the LICENSE file found in the top-level directory
|
|
3
|
-
// of this distribution and at http://opencv.org/license.html.
|
|
4
|
-
|
|
5
|
-
#ifndef OPENCV_TRACE_PRIVATE_HPP
|
|
6
|
-
#define OPENCV_TRACE_PRIVATE_HPP
|
|
7
|
-
|
|
8
|
-
#ifdef OPENCV_TRACE
|
|
9
|
-
|
|
10
|
-
#include <opencv2/core/utils/logger.hpp>
|
|
11
|
-
|
|
12
|
-
#include <opencv2/core/utils/tls.hpp>
|
|
13
|
-
|
|
14
|
-
#include "trace.hpp"
|
|
15
|
-
|
|
16
|
-
//! @cond IGNORED
|
|
17
|
-
|
|
18
|
-
#include <deque>
|
|
19
|
-
#include <ostream>
|
|
20
|
-
|
|
21
|
-
#define INTEL_ITTNOTIFY_API_PRIVATE 1
|
|
22
|
-
#ifdef OPENCV_WITH_ITT
|
|
23
|
-
#include "ittnotify.h"
|
|
24
|
-
#endif
|
|
25
|
-
|
|
26
|
-
#ifndef DEBUG_ONLY
|
|
27
|
-
#ifdef _DEBUG
|
|
28
|
-
#define DEBUG_ONLY(...) __VA_ARGS__
|
|
29
|
-
#else
|
|
30
|
-
#define DEBUG_ONLY(...) (void)0
|
|
31
|
-
#endif
|
|
32
|
-
#endif
|
|
33
|
-
|
|
34
|
-
#ifndef DEBUG_ONLY_
|
|
35
|
-
#ifdef _DEBUG
|
|
36
|
-
#define DEBUG_ONLY_(...) __VA_ARGS__
|
|
37
|
-
#else
|
|
38
|
-
#define DEBUG_ONLY_(...)
|
|
39
|
-
#endif
|
|
40
|
-
#endif
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
namespace cv {
|
|
44
|
-
namespace utils {
|
|
45
|
-
namespace trace {
|
|
46
|
-
namespace details {
|
|
47
|
-
|
|
48
|
-
#define CV__TRACE_OPENCV_FUNCTION_NAME_(name, flags) \
|
|
49
|
-
CV__TRACE_DEFINE_LOCATION_FN(name, flags); \
|
|
50
|
-
const CV_TRACE_NS::details::Region __region_fn(CV__TRACE_LOCATION_VARNAME(fn));
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
enum RegionFlag {
|
|
54
|
-
REGION_FLAG__NEED_STACK_POP = (1 << 0),
|
|
55
|
-
REGION_FLAG__ACTIVE = (1 << 1),
|
|
56
|
-
|
|
57
|
-
ENUM_REGION_FLAG_IMPL_FORCE_INT = INT_MAX
|
|
58
|
-
};
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
class TraceMessage;
|
|
62
|
-
|
|
63
|
-
class TraceStorage {
|
|
64
|
-
public:
|
|
65
|
-
TraceStorage() {}
|
|
66
|
-
virtual ~TraceStorage() {}
|
|
67
|
-
|
|
68
|
-
virtual bool put(const TraceMessage& msg) const = 0;
|
|
69
|
-
};
|
|
70
|
-
|
|
71
|
-
struct RegionStatistics
|
|
72
|
-
{
|
|
73
|
-
int currentSkippedRegions;
|
|
74
|
-
|
|
75
|
-
int64 duration;
|
|
76
|
-
#ifdef HAVE_IPP
|
|
77
|
-
int64 durationImplIPP;
|
|
78
|
-
#endif
|
|
79
|
-
#ifdef HAVE_OPENCL
|
|
80
|
-
int64 durationImplOpenCL;
|
|
81
|
-
#endif
|
|
82
|
-
#ifdef HAVE_OPENVX
|
|
83
|
-
int64 durationImplOpenVX;
|
|
84
|
-
#endif
|
|
85
|
-
|
|
86
|
-
RegionStatistics() :
|
|
87
|
-
currentSkippedRegions(0),
|
|
88
|
-
duration(0)
|
|
89
|
-
#ifdef HAVE_IPP
|
|
90
|
-
,durationImplIPP(0)
|
|
91
|
-
#endif
|
|
92
|
-
#ifdef HAVE_OPENCL
|
|
93
|
-
,durationImplOpenCL(0)
|
|
94
|
-
#endif
|
|
95
|
-
#ifdef HAVE_OPENVX
|
|
96
|
-
,durationImplOpenVX(0)
|
|
97
|
-
#endif
|
|
98
|
-
{}
|
|
99
|
-
|
|
100
|
-
void grab(RegionStatistics& result)
|
|
101
|
-
{
|
|
102
|
-
result.currentSkippedRegions = currentSkippedRegions; currentSkippedRegions = 0;
|
|
103
|
-
result.duration = duration; duration = 0;
|
|
104
|
-
#ifdef HAVE_IPP
|
|
105
|
-
result.durationImplIPP = durationImplIPP; durationImplIPP = 0;
|
|
106
|
-
#endif
|
|
107
|
-
#ifdef HAVE_OPENCL
|
|
108
|
-
result.durationImplOpenCL = durationImplOpenCL; durationImplOpenCL = 0;
|
|
109
|
-
#endif
|
|
110
|
-
#ifdef HAVE_OPENVX
|
|
111
|
-
result.durationImplOpenVX = durationImplOpenVX; durationImplOpenVX = 0;
|
|
112
|
-
#endif
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
void append(RegionStatistics& stat)
|
|
116
|
-
{
|
|
117
|
-
currentSkippedRegions += stat.currentSkippedRegions;
|
|
118
|
-
duration += stat.duration;
|
|
119
|
-
#ifdef HAVE_IPP
|
|
120
|
-
durationImplIPP += stat.durationImplIPP;
|
|
121
|
-
#endif
|
|
122
|
-
#ifdef HAVE_OPENCL
|
|
123
|
-
durationImplOpenCL += stat.durationImplOpenCL;
|
|
124
|
-
#endif
|
|
125
|
-
#ifdef HAVE_OPENVX
|
|
126
|
-
durationImplOpenVX += stat.durationImplOpenVX;
|
|
127
|
-
#endif
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
void multiply(const float c)
|
|
131
|
-
{
|
|
132
|
-
duration = (int64)(duration * c);
|
|
133
|
-
#ifdef HAVE_IPP
|
|
134
|
-
durationImplIPP = (int64)(durationImplIPP * c);
|
|
135
|
-
#endif
|
|
136
|
-
#ifdef HAVE_OPENCL
|
|
137
|
-
durationImplOpenCL = (int64)(durationImplOpenCL * c);
|
|
138
|
-
#endif
|
|
139
|
-
#ifdef HAVE_OPENVX
|
|
140
|
-
durationImplOpenVX = (int64)(durationImplOpenVX * c);
|
|
141
|
-
#endif
|
|
142
|
-
}
|
|
143
|
-
};
|
|
144
|
-
|
|
145
|
-
static inline
|
|
146
|
-
std::ostream& operator<<(std::ostream& out, const RegionStatistics& stat)
|
|
147
|
-
{
|
|
148
|
-
out << "skip=" << stat.currentSkippedRegions
|
|
149
|
-
<< " duration=" << stat.duration
|
|
150
|
-
#ifdef HAVE_IPP
|
|
151
|
-
<< " durationImplIPP=" << stat.durationImplIPP
|
|
152
|
-
#endif
|
|
153
|
-
#ifdef HAVE_OPENCL
|
|
154
|
-
<< " durationImplOpenCL=" << stat.durationImplOpenCL
|
|
155
|
-
#endif
|
|
156
|
-
#ifdef HAVE_OPENVX
|
|
157
|
-
<< " durationImplOpenVX=" << stat.durationImplOpenVX
|
|
158
|
-
#endif
|
|
159
|
-
;
|
|
160
|
-
return out;
|
|
161
|
-
}
|
|
162
|
-
|
|
163
|
-
struct RegionStatisticsStatus
|
|
164
|
-
{
|
|
165
|
-
int _skipDepth;
|
|
166
|
-
#ifdef HAVE_IPP
|
|
167
|
-
int ignoreDepthImplIPP;
|
|
168
|
-
#endif
|
|
169
|
-
#ifdef HAVE_OPENCL
|
|
170
|
-
int ignoreDepthImplOpenCL;
|
|
171
|
-
#endif
|
|
172
|
-
#ifdef HAVE_OPENVX
|
|
173
|
-
int ignoreDepthImplOpenVX;
|
|
174
|
-
#endif
|
|
175
|
-
|
|
176
|
-
RegionStatisticsStatus() { reset(); }
|
|
177
|
-
|
|
178
|
-
void reset()
|
|
179
|
-
{
|
|
180
|
-
_skipDepth = -1;
|
|
181
|
-
#ifdef HAVE_IPP
|
|
182
|
-
ignoreDepthImplIPP = 0;
|
|
183
|
-
#endif
|
|
184
|
-
#ifdef HAVE_OPENCL
|
|
185
|
-
ignoreDepthImplOpenCL = 0;
|
|
186
|
-
#endif
|
|
187
|
-
#ifdef HAVE_OPENVX
|
|
188
|
-
ignoreDepthImplOpenVX = 0;
|
|
189
|
-
#endif
|
|
190
|
-
}
|
|
191
|
-
|
|
192
|
-
void propagateFrom(const RegionStatisticsStatus& src)
|
|
193
|
-
{
|
|
194
|
-
_skipDepth = -1;
|
|
195
|
-
if (src._skipDepth >= 0)
|
|
196
|
-
enableSkipMode(0);
|
|
197
|
-
#ifdef HAVE_IPP
|
|
198
|
-
ignoreDepthImplIPP = src.ignoreDepthImplIPP ? 1 : 0;
|
|
199
|
-
#endif
|
|
200
|
-
#ifdef HAVE_OPENCL
|
|
201
|
-
ignoreDepthImplOpenCL = src.ignoreDepthImplOpenCL ? 1 : 0;
|
|
202
|
-
#endif
|
|
203
|
-
#ifdef HAVE_OPENVX
|
|
204
|
-
ignoreDepthImplOpenVX = src.ignoreDepthImplOpenVX ? 1 : 0;
|
|
205
|
-
#endif
|
|
206
|
-
}
|
|
207
|
-
|
|
208
|
-
void enableSkipMode(int depth);
|
|
209
|
-
void checkResetSkipMode(int leaveDepth);
|
|
210
|
-
};
|
|
211
|
-
|
|
212
|
-
static inline
|
|
213
|
-
std::ostream& operator<<(std::ostream& out, const RegionStatisticsStatus& s)
|
|
214
|
-
{
|
|
215
|
-
out << "ignore={";
|
|
216
|
-
if (s._skipDepth >= 0)
|
|
217
|
-
out << " SKIP=" << s._skipDepth;
|
|
218
|
-
#ifdef HAVE_IPP
|
|
219
|
-
if (s.ignoreDepthImplIPP)
|
|
220
|
-
out << " IPP=" << s.ignoreDepthImplIPP;
|
|
221
|
-
#endif
|
|
222
|
-
#ifdef HAVE_OPENCL
|
|
223
|
-
if (s.ignoreDepthImplOpenCL)
|
|
224
|
-
out << " OpenCL=" << s.ignoreDepthImplOpenCL;
|
|
225
|
-
#endif
|
|
226
|
-
#ifdef HAVE_OPENVX
|
|
227
|
-
if (s.ignoreDepthImplOpenVX)
|
|
228
|
-
out << " OpenVX=" << s.ignoreDepthImplOpenVX;
|
|
229
|
-
#endif
|
|
230
|
-
out << "}";
|
|
231
|
-
return out;
|
|
232
|
-
}
|
|
233
|
-
|
|
234
|
-
//! TraceManager for local thread
|
|
235
|
-
struct TraceManagerThreadLocal
|
|
236
|
-
{
|
|
237
|
-
const int threadID;
|
|
238
|
-
int region_counter;
|
|
239
|
-
|
|
240
|
-
size_t totalSkippedEvents;
|
|
241
|
-
|
|
242
|
-
Region* currentActiveRegion;
|
|
243
|
-
|
|
244
|
-
struct StackEntry
|
|
245
|
-
{
|
|
246
|
-
Region* region;
|
|
247
|
-
const Region::LocationStaticStorage* location;
|
|
248
|
-
int64 beginTimestamp;
|
|
249
|
-
StackEntry(Region* region_, const Region::LocationStaticStorage* location_, int64 beginTimestamp_) :
|
|
250
|
-
region(region_), location(location_), beginTimestamp(beginTimestamp_)
|
|
251
|
-
{}
|
|
252
|
-
StackEntry() : region(NULL), location(NULL), beginTimestamp(-1) {}
|
|
253
|
-
};
|
|
254
|
-
std::deque<StackEntry> stack;
|
|
255
|
-
|
|
256
|
-
int regionDepth; // functions only (no named regions)
|
|
257
|
-
int regionDepthOpenCV; // functions from OpenCV library
|
|
258
|
-
|
|
259
|
-
RegionStatistics stat;
|
|
260
|
-
RegionStatisticsStatus stat_status;
|
|
261
|
-
|
|
262
|
-
StackEntry dummy_stack_top; // parallel_for root region
|
|
263
|
-
RegionStatistics parallel_for_stat;
|
|
264
|
-
RegionStatisticsStatus parallel_for_stat_status;
|
|
265
|
-
size_t parallel_for_stack_size;
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
mutable cv::Ptr<TraceStorage> storage;
|
|
269
|
-
|
|
270
|
-
TraceManagerThreadLocal() :
|
|
271
|
-
threadID(cv::utils::getThreadID()),
|
|
272
|
-
region_counter(0), totalSkippedEvents(0),
|
|
273
|
-
currentActiveRegion(NULL),
|
|
274
|
-
regionDepth(0),
|
|
275
|
-
regionDepthOpenCV(0),
|
|
276
|
-
parallel_for_stack_size(0)
|
|
277
|
-
{
|
|
278
|
-
}
|
|
279
|
-
|
|
280
|
-
~TraceManagerThreadLocal();
|
|
281
|
-
|
|
282
|
-
TraceStorage* getStorage() const;
|
|
283
|
-
|
|
284
|
-
void recordLocation(const Region::LocationStaticStorage& location);
|
|
285
|
-
void recordRegionEnter(const Region& region);
|
|
286
|
-
void recordRegionLeave(const Region& region, const RegionStatistics& result);
|
|
287
|
-
void recordRegionArg(const Region& region, const TraceArg& arg, const char& value);
|
|
288
|
-
|
|
289
|
-
inline void stackPush(Region* region, const Region::LocationStaticStorage* location, int64 beginTimestamp)
|
|
290
|
-
{
|
|
291
|
-
stack.push_back(StackEntry(region, location, beginTimestamp));
|
|
292
|
-
}
|
|
293
|
-
inline Region* stackTopRegion() const
|
|
294
|
-
{
|
|
295
|
-
if (stack.empty())
|
|
296
|
-
return dummy_stack_top.region;
|
|
297
|
-
return stack.back().region;
|
|
298
|
-
}
|
|
299
|
-
inline const Region::LocationStaticStorage* stackTopLocation() const
|
|
300
|
-
{
|
|
301
|
-
if (stack.empty())
|
|
302
|
-
return dummy_stack_top.location;
|
|
303
|
-
return stack.back().location;
|
|
304
|
-
}
|
|
305
|
-
inline int64 stackTopBeginTimestamp() const
|
|
306
|
-
{
|
|
307
|
-
if (stack.empty())
|
|
308
|
-
return dummy_stack_top.beginTimestamp;
|
|
309
|
-
return stack.back().beginTimestamp;
|
|
310
|
-
}
|
|
311
|
-
inline void stackPop()
|
|
312
|
-
{
|
|
313
|
-
CV_DbgAssert(!stack.empty());
|
|
314
|
-
stack.pop_back();
|
|
315
|
-
}
|
|
316
|
-
void dumpStack(std::ostream& out, bool onlyFunctions) const;
|
|
317
|
-
|
|
318
|
-
inline Region* getCurrentActiveRegion()
|
|
319
|
-
{
|
|
320
|
-
return currentActiveRegion;
|
|
321
|
-
}
|
|
322
|
-
|
|
323
|
-
inline int getCurrentDepth() const { return (int)stack.size(); }
|
|
324
|
-
};
|
|
325
|
-
|
|
326
|
-
class CV_EXPORTS TraceManager
|
|
327
|
-
{
|
|
328
|
-
public:
|
|
329
|
-
TraceManager();
|
|
330
|
-
~TraceManager();
|
|
331
|
-
|
|
332
|
-
static bool isActivated();
|
|
333
|
-
|
|
334
|
-
Mutex mutexCreate;
|
|
335
|
-
Mutex mutexCount;
|
|
336
|
-
|
|
337
|
-
TLSDataAccumulator<TraceManagerThreadLocal> tls;
|
|
338
|
-
|
|
339
|
-
cv::Ptr<TraceStorage> trace_storage;
|
|
340
|
-
private:
|
|
341
|
-
// disable copying
|
|
342
|
-
TraceManager(const TraceManager&);
|
|
343
|
-
TraceManager& operator=(const TraceManager&);
|
|
344
|
-
};
|
|
345
|
-
|
|
346
|
-
CV_EXPORTS TraceManager& getTraceManager();
|
|
347
|
-
inline Region* getCurrentActiveRegion() { return getTraceManager().tls.get()->getCurrentActiveRegion(); }
|
|
348
|
-
inline Region* getCurrentRegion() { return getTraceManager().tls.get()->stackTopRegion(); }
|
|
349
|
-
|
|
350
|
-
void parallelForSetRootRegion(const Region& rootRegion, const TraceManagerThreadLocal& root_ctx);
|
|
351
|
-
void parallelForAttachNestedRegion(const Region& rootRegion);
|
|
352
|
-
void parallelForFinalize(const Region& rootRegion);
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
struct Region::LocationExtraData
|
|
361
|
-
{
|
|
362
|
-
int global_location_id; // 0 - region is disabled
|
|
363
|
-
#ifdef OPENCV_WITH_ITT
|
|
364
|
-
// Special fields for ITT
|
|
365
|
-
__itt_string_handle* volatile ittHandle_name;
|
|
366
|
-
__itt_string_handle* volatile ittHandle_filename;
|
|
367
|
-
#endif
|
|
368
|
-
LocationExtraData(const LocationStaticStorage& location);
|
|
369
|
-
|
|
370
|
-
static Region::LocationExtraData* init(const Region::LocationStaticStorage& location);
|
|
371
|
-
};
|
|
372
|
-
|
|
373
|
-
class Region::Impl
|
|
374
|
-
{
|
|
375
|
-
public:
|
|
376
|
-
const LocationStaticStorage& location;
|
|
377
|
-
|
|
378
|
-
Region& region;
|
|
379
|
-
Region* const parentRegion;
|
|
380
|
-
|
|
381
|
-
const int threadID;
|
|
382
|
-
const int global_region_id;
|
|
383
|
-
|
|
384
|
-
const int64 beginTimestamp;
|
|
385
|
-
int64 endTimestamp;
|
|
386
|
-
|
|
387
|
-
int directChildrenCount;
|
|
388
|
-
|
|
389
|
-
enum OptimizationPath {
|
|
390
|
-
CODE_PATH_PLAIN = 0,
|
|
391
|
-
CODE_PATH_IPP,
|
|
392
|
-
CODE_PATH_OPENCL,
|
|
393
|
-
CODE_PATH_OPENVX
|
|
394
|
-
};
|
|
395
|
-
|
|
396
|
-
#ifdef OPENCV_WITH_ITT
|
|
397
|
-
bool itt_id_registered;
|
|
398
|
-
__itt_id itt_id;
|
|
399
|
-
#endif
|
|
400
|
-
|
|
401
|
-
Impl(TraceManagerThreadLocal& ctx, Region* parentRegion_, Region& region_, const LocationStaticStorage& location_, int64 beginTimestamp_);
|
|
402
|
-
|
|
403
|
-
void enterRegion(TraceManagerThreadLocal& ctx);
|
|
404
|
-
void leaveRegion(TraceManagerThreadLocal& ctx);
|
|
405
|
-
|
|
406
|
-
void registerRegion(TraceManagerThreadLocal& ctx);
|
|
407
|
-
|
|
408
|
-
void release();
|
|
409
|
-
protected:
|
|
410
|
-
~Impl();
|
|
411
|
-
};
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
}}}} // namespace
|
|
416
|
-
|
|
417
|
-
//! @endcond
|
|
418
|
-
|
|
419
|
-
#endif
|
|
420
|
-
|
|
421
|
-
#endif // OPENCV_TRACE_PRIVATE_HPP
|
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
// This file is part of OpenCV project.
|
|
2
|
-
// It is subject to the license terms in the LICENSE file found in the top-level directory
|
|
3
|
-
// of this distribution and at http://opencv.org/license.html.
|
|
4
|
-
|
|
5
|
-
// Copyright (C) 2015, Itseez, Inc., all rights reserved.
|
|
6
|
-
// Third party copyrights are property of their respective owners.
|
|
7
|
-
|
|
8
|
-
#ifndef OPENCV_CORE_VA_INTEL_HPP
|
|
9
|
-
#define OPENCV_CORE_VA_INTEL_HPP
|
|
10
|
-
|
|
11
|
-
#ifndef __cplusplus
|
|
12
|
-
# error va_intel.hpp header must be compiled as C++
|
|
13
|
-
#endif
|
|
14
|
-
|
|
15
|
-
#include "opencv2/core.hpp"
|
|
16
|
-
#include "ocl.hpp"
|
|
17
|
-
|
|
18
|
-
#if defined(HAVE_VA)
|
|
19
|
-
# include "va/va.h"
|
|
20
|
-
#else // HAVE_VA
|
|
21
|
-
# if !defined(_VA_H_)
|
|
22
|
-
typedef void* VADisplay;
|
|
23
|
-
typedef unsigned int VASurfaceID;
|
|
24
|
-
# endif // !_VA_H_
|
|
25
|
-
#endif // HAVE_VA
|
|
26
|
-
|
|
27
|
-
namespace cv { namespace va_intel {
|
|
28
|
-
|
|
29
|
-
/** @addtogroup core_va_intel
|
|
30
|
-
This section describes Intel VA-API/OpenCL (CL-VA) interoperability.
|
|
31
|
-
|
|
32
|
-
To enable basic VA interoperability build OpenCV with libva library integration enabled: `-DWITH_VA=ON` (corresponding dev package should be installed).
|
|
33
|
-
|
|
34
|
-
To enable advanced CL-VA interoperability support on Intel HW, enable option: `-DWITH_VA_INTEL=ON` (OpenCL integration should be enabled which is the default setting). Special runtime environment should be set up in order to use this feature: correct combination of [libva](https://github.com/intel/libva), [OpenCL runtime](https://github.com/intel/compute-runtime) and [media driver](https://github.com/intel/media-driver) should be installed.
|
|
35
|
-
|
|
36
|
-
Check usage example for details: samples/va_intel/va_intel_interop.cpp
|
|
37
|
-
*/
|
|
38
|
-
//! @{
|
|
39
|
-
|
|
40
|
-
/////////////////// CL-VA Interoperability Functions ///////////////////
|
|
41
|
-
|
|
42
|
-
namespace ocl {
|
|
43
|
-
using namespace cv::ocl;
|
|
44
|
-
|
|
45
|
-
// TODO static functions in the Context class
|
|
46
|
-
/** @brief Creates OpenCL context from VA.
|
|
47
|
-
@param display - VADisplay for which CL interop should be established.
|
|
48
|
-
@param tryInterop - try to set up for interoperability, if true; set up for use slow copy if false.
|
|
49
|
-
@return Returns reference to OpenCL Context
|
|
50
|
-
*/
|
|
51
|
-
CV_EXPORTS Context& initializeContextFromVA(VADisplay display, bool tryInterop = true);
|
|
52
|
-
|
|
53
|
-
} // namespace cv::va_intel::ocl
|
|
54
|
-
|
|
55
|
-
/** @brief Converts InputArray to VASurfaceID object.
|
|
56
|
-
@param display - VADisplay object.
|
|
57
|
-
@param src - source InputArray.
|
|
58
|
-
@param surface - destination VASurfaceID object.
|
|
59
|
-
@param size - size of image represented by VASurfaceID object.
|
|
60
|
-
*/
|
|
61
|
-
CV_EXPORTS void convertToVASurface(VADisplay display, InputArray src, VASurfaceID surface, Size size);
|
|
62
|
-
|
|
63
|
-
/** @brief Converts VASurfaceID object to OutputArray.
|
|
64
|
-
@param display - VADisplay object.
|
|
65
|
-
@param surface - source VASurfaceID object.
|
|
66
|
-
@param size - size of image represented by VASurfaceID object.
|
|
67
|
-
@param dst - destination OutputArray.
|
|
68
|
-
*/
|
|
69
|
-
CV_EXPORTS void convertFromVASurface(VADisplay display, VASurfaceID surface, Size size, OutputArray dst);
|
|
70
|
-
|
|
71
|
-
//! @}
|
|
72
|
-
|
|
73
|
-
}} // namespace cv::va_intel
|
|
74
|
-
|
|
75
|
-
#endif /* OPENCV_CORE_VA_INTEL_HPP */
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
// This file is part of OpenCV project.
|
|
2
|
-
// It is subject to the license terms in the LICENSE file found in the top-level directory
|
|
3
|
-
// of this distribution and at http://opencv.org/license.html.
|
|
4
|
-
|
|
5
|
-
#ifndef OPENCV_VERSION_HPP
|
|
6
|
-
#define OPENCV_VERSION_HPP
|
|
7
|
-
|
|
8
|
-
#define CV_VERSION_MAJOR 4
|
|
9
|
-
#define CV_VERSION_MINOR 7
|
|
10
|
-
#define CV_VERSION_REVISION 0
|
|
11
|
-
#define CV_VERSION_STATUS ""
|
|
12
|
-
|
|
13
|
-
#define CVAUX_STR_EXP(__A) #__A
|
|
14
|
-
#define CVAUX_STR(__A) CVAUX_STR_EXP(__A)
|
|
15
|
-
|
|
16
|
-
#define CVAUX_STRW_EXP(__A) L ## #__A
|
|
17
|
-
#define CVAUX_STRW(__A) CVAUX_STRW_EXP(__A)
|
|
18
|
-
|
|
19
|
-
#define CV_VERSION CVAUX_STR(CV_VERSION_MAJOR) "." CVAUX_STR(CV_VERSION_MINOR) "." CVAUX_STR(CV_VERSION_REVISION) CV_VERSION_STATUS
|
|
20
|
-
|
|
21
|
-
/* old style version constants*/
|
|
22
|
-
#define CV_MAJOR_VERSION CV_VERSION_MAJOR
|
|
23
|
-
#define CV_MINOR_VERSION CV_VERSION_MINOR
|
|
24
|
-
#define CV_SUBMINOR_VERSION CV_VERSION_REVISION
|
|
25
|
-
|
|
26
|
-
#endif // OPENCV_VERSION_HPP
|