- renamed Cascade Lake AVX512_CEL => AVX512_CLX (align with Intel SDE tool)
- fixed CLX instruction sets (no IFMA/VBMI)
- added flag to bypass CPU baseline check: OPENCV_SKIP_CPU_BASELINE_CHECK
> Size parameter is changed from int to cv::Size type to allow rectangle kernels
> Kernel creation code is adopted for different kernel sizes to not create only white images on the output
G-API: add transformation logic to GCompiler
* Introduce transformation logic to GCOmpiler
* Remove partialOk() method
* Fix minor issues
* Refactor code according to code review
1. Re-design matchPatternToSubstitute logic
2. Update transformations order
3. Replace check_transformations pass with a
one time check in GCompiler ctor
* Revert unused nodes handling in pattern matching
* Address minor code review issues
* Address code review comments:
1) Fix some mistakes
2) Add new tests for endless loops
3) Update GCompiler's transformations logic
* Simplify GCompiler check for endless loops
1. Simplify transformations endless loops check:
- Original idea wasn't a full solution
- Need to develop a good method (heuristic?) to find loops
in general case (TODO)
2. Remove irrelevant Endless Loops tests
3. Add new "bad arg" tests and unit tests
* Update comments
[GSoC 2019] Improve the performance of JavaScript version of OpenCV (OpenCV.js)
* [GSoC 2019]
Improve the performance of JavaScript version of OpenCV (OpenCV.js):
1. Create the base of OpenCV.js performance test:
This perf test is based on benchmark.js(https://benchmarkjs.com). And first add `cvtColor`, `Resize`, `Threshold` into it.
2. Optimize the OpenCV.js performance by WASM threads:
This optimization is based on Web Worker API and SharedArrayBuffer, so it can be only used in browser.
3. Optimize the OpenCV.js performance by WASM SIMD:
Add WASM SIMD backend for OpenCV Universal Intrinsics. It's experimental as WASM SIMD is still in development.
* [GSoC2019]
1. use short license header
2. fix documentation node issue
3. remove the unused `hasSIMD128()` api
* [GSoC2019]
1. fix emscripten define
2. use fallback function for f16
* [GSoC2019]
Fix rebase issue
* Added MSA implementations for mips platforms. Intrinsics for MSA and build scripts for MIPS platforms are added.
Signed-off-by: Fei Wu <fwu@wavecomp.com>
* Removed some unused code in mips.toolchain.cmake.
Signed-off-by: Fei Wu <fwu@wavecomp.com>
* Added comments for mips toolchain configuration and disabled compiling warnings for libpng.
Signed-off-by: Fei Wu <fwu@wavecomp.com>
* Fixed the build error of unsupported opcode 'pause' when mips isa_rev is less than 2.
Signed-off-by: Fei Wu <fwu@wavecomp.com>
* 1. Removed FP16 related item in MSA option defines in OpenCVCompilerOptimizations.cmake.
2. Use CV_CPU_COMPILE_MSA instead of __mips_msa for MSA feature check in cv_cpu_dispatch.h.
3. Removed hasSIMD128() in intrin_msa.hpp.
4. Define CPU_MSA as 150.
Signed-off-by: Fei Wu <fwu@wavecomp.com>
* 1. Removed unnecessary CV_SIMD128_64F guarding in intrin_msa.hpp.
2. Removed unnecessary CV_MSA related code block in dotProd_8u().
Signed-off-by: Fei Wu <fwu@wavecomp.com>
* 1. Defined CPU_MSA_FLAGS_ON as "-mmsa".
2. Removed CV_SIMD128_64F guardings in intrin_msa.hpp.
Signed-off-by: Fei Wu <fwu@wavecomp.com>
* Removed unused msa_mlal_u16() and msa_mlal_s16 from msa_macros.h.
Signed-off-by: Fei Wu <fwu@wavecomp.com>
* issue 5769 fixed: cv::stereoRectify fails if given inliers mask of type vector<uchar>
* issue5769 fix using reshape and add regression test
* regression test with outlier detection, testing vector and mat data
* Size comparision of wrong vector within CV_Assert in regression test corrected
* cleanup test code
ISA 2.07 (aka POWER8) effectively extended the expanding multiply
operation to word types. The altivec intrinsics prior to gcc 8 did
not get the update.
Workaround this deficiency similar to other fixes.
This was exposed by commit 33fb253a66
which leverages the int -> dword expanding multiply.
This fixes Issue #15506
* Adding all possible data type interactions to the perf tests since some
use SIMD acceleration and others do not.
* Disabling full tests by default.
* Giving proper names, removing magic numbers and sanity checks of new
performance tests for the integral function.
* Giving proper names, making array static.
* - headers in "infer/" and "infer/ie/" folders are included into gapi_ext_hdrs;
+ because of that a few #includes are required in the headers
- HAVE_INF_ENGINE flag check in headers "infer/ie.hpp" and "infer/ie/util.hpp" is deleted
* - the "ie/util.hpp" header is a private header now as it's used for tests; it's been moved to the scr directory to the place next to the implementation file "ie/giebackend.cpp"
- the path to this header in files "ie/giebackend.cpp" and "test/infer/gapi_infer_ie_test.cpp" is updated
- As it's private header now and explicitly depends on IE, the "HAVE_INF_ENGINE" flag check is returned
* Support GArray as input in fluid kernels
* Create tests on GArray input in fluid
* Some fixes to fully support GArray
* Refactor code and change the kernel according to review
* Add histogram calculation as a G-API kernel
Add assert that input GArgs in fluid contain at least one GMat
* Convert ImgWarp from SSE SIMD to HAL - 2.8x faster on Power (VSX) and 15% speedup on x86
* Change compile flag from CV_SIMD128 to CV_SIMD128_64F for use of v_float64x2 type
* Changing WarpPerspectiveLine from class functions and dispatching to static functions.
* Re-add dynamic runtime and dispatch execution.
* RRestore SSE4_1 optimizations inside opt_SSE4_1 namespace
* Convert lkpyramid from SSE SIMD to HAL - 90% faster on Power (VSX).
* Replace stores with reduce_sum. Rework to handle endianess correctly.
* Fix compiler warnings by casting values explicitly to shorts
* Switch to CV_SIMD128 compiler definition. Unroll loop to 8 elements since we've already loaded the data.
Detected by clang trunk:
```
opencv/modules/core/src/ocl.cpp:4337:37: warning: object backing the pointer will be destroyed at the end of the full-expression [-Wdangling]
CV_OCL_CHECK_RESULT(retval, cv::format("clCreateBuffer(capacity=%lld) => %p", (long long int)entry.capacity_, (void*)entry.clBuffer_).c_str());
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
opencv/modules/core/src/ocl.cpp:193:42: note: expanded from macro 'CV_OCL_CHECK_RESULT'
if (0) { const char* msg_ = (msg); CV_UNUSED(msg_); /* ensure const char* type (cv::String without c_str()) */ } \
```
because `cv::format` yields a temporary std::string, and thus `msg_` points to a destroyed buffer.
* Fix the detection of XIMEA on Windows (when it has been installed by another user with administrative privileges, for example).
* Change the flow: we first try HKEY_CURRENT_USER key and, if empty, then try HKEY_LOCAL_MACHINE
Use 4x FMA chains to sum on SIMD 128 FP64 targets. On
x86 this showed about 1.4x improvement.
For PPC, do a full multiply (32x32->64b), convert to DP
then accumulate. This may be slightly less precise for
some inputs. But is 1.5x faster than the above which
is about 1.5x than the FMA above for ~2.5x speedup.
* in embindgen.py added inpaint function
* added test for inpaint function and fixed function in build_js
* fixed test for inpaint function
* rotate deleted, build_js.py fixed
G-API: Fix Journal usage in Fluid backend (#15238)
* Fix Journal usage in Fluid backend
* Delete dumpDotRequired(): invalid check
* Update mem consumption test
* Test that new test works
* Debug memory consumption function
* Increase iterations in test
* Re-write memory consumption measurement part
* Restore correct fix for Fluid journals
* G-API: rename ArgKind OPAQUE to GOPAQUE
Rename ArgKind value to GOPAQUE to fix conflict in the
user code when wingdi.h is included: it defines OPAQUE
macro that (for some reason) is chosen instead of ArgKind
value
* Add compatibility with existing API
* Renamed GOPAQUE to OPAQUE_VAL
Convert HOG from SSE SIMD to HAL - 35-45% faster on Power (VSX) (#15199)
* Convert SSE SIMD to HAL. 35-45% improvement for Power (VSX)
* Remove CV_NEON code. Use v_floor instead of 3 lines of code.
* Invert comparison logic to simplify code.
* Change initialization from v_load to constructor type.
* Remove unavoidable print of CV error
The return value covers whether the device exists.
This might be better hidden behind a debug flag, but I couldn't work out how to do that nicely.
* Use `CV_LOG_WARNING` macro to log rather than removing it entirely
* add -Wno-psabi when using GCC 6
* add -Wundef for CUDA 10
* add -Wdeprecated-declarations when using GCC 7
* add -Wstrict-aliasing and -Wtautological-compare for GCC 7
* replace cudaThreadSynchronize with cudaDeviceSynchronize
Implement cvRound using inline asm. No compiler support
exists today to properly optimize this. This results in
about a 4x speedup over the default rounding. Likewise,
simplify the growing number of rounding function overloads.
For P9 enabled targets, utilize the classification
testing instruction to test for Inf/Nan values. Operation
speedup is about 1.2x for FP32, and 1.5x for FP64 operands.
For P8 targets, fallback to the GCC nan inline. It provides
a 1.1/1.4x improvement for FP32/FP64 arguments.
Add a new macro definition OPENCV_USE_FASTMATH_GCC_BUILTINS to enable
usage of GCC inline math functions, if available and requested by the
user.
Likewise, enable it for POWER. This is nearly always a substantial
improvement over using integer manipulation as most operations can
be done in several instructions with no branching. The result is a
1.5-1.8x speedup in the ceil/floor operations.
1. As tested with AT 12.0-1 (GCC 8.3.1) compiler on P9 LE.
Add a basic sanity test to verify the rounding functions
work as expected.
Likewise, extend the rounding performance test to cover the
additional float -> int fast math functions.
Support new IE API (#15184)
* Add support OpenVINO R2 for layers
* Add Core API
* Fix tests
* Fix expectNoFallbacksFromIE for ONNX nets
* Remove deprecated API
* Remove td
* Remove TargetDevice
* Fix Async
* Add test
* Fix detectMyriadX
* Fix test
* Fix warning
* G-API-NG/API: Introduced inference API and IE-based backend
- Very quick-n-dirty implementation
- OpenCV's own DNN module is not used
- No tests so far
* G-API-NG/IE: Refined IE backend, added more tests
* G-API-NG/IE: Fixed various CI warnings & build issues + tests
- Added tests on multi-dimensional own::Mat
- Added tests on GMatDesc with dimensions
- Documentation on infer.hpp
- Fixed more warnings + added a ROI list test
- Fix descr_of clash for vector<Mat> & standalone mode
- Fix build issue with gcc-4.8x
- Addressed review comments
* G-API-NG/IE: Addressed review comments
- Pass `false` to findDataFile()
- Add deprecation warning suppression macros for IE
* Support for several min and max sizes in PriorBox layer
* Fix minSize
* Check size
* Modify initInfEngine
* Fix tests
* Fix IE support
* Add priorbox test
* Remove inputs
* G-API: fix GOCLExecutable issue with UMat lifetime
Add tests on initialized/uninitialized outputs for all
backends
* Use proper clean-up procedure for magazine
* Rename InitOut test and reduce tested sizes
* Enable output allocation test
G-API: GAPI_TRANSFORM internal functionality rework (#14952)
* Change internal pattern and substitute signatures and refactor tests
* Enhance GArrayU with type-checker function
Add a couple of new tests on GAPI_TRANSFORM
* Added support for the ONNX "ReduceMean" Layer. (as this is the same as the GlobalAveragePool)
* Add ReduceMean test
* Fix ONNX importer
* Fix ReduceMean
* Add assert
* Split test
* Fix split test
G-API: clean up accuracy tests (#14945)
* Delete createOutputMatrices flag
Update the way compile args function is created
Fix instantiation suffix print function
* Update comment (NB)
* Make printable comparison functions
* Use defines instead of objects for compile args
* Remove custom printers, use operator<< overload
* Remove SAME_TYPE and use -1 instead
* Delete createOutputMatrices flag in new tests
* Fix GetParam() printed values
* Update Resize tests: use CompareF object
* Address code review feedback
* Add default cases for operator<< overloads
* change throw to GAPI_Assert
G-API: Add output allocation tests for backends (#15012)
* Add output tests for backends
* Fix large size test: output is in fact reallocated
* Use cv::Mat copies for reallocation tracking
* Separate LargeSizeWithCorrectSubmatrix test
* Rename backed output allocation tests
* Address code review feedback
Update test names
Add illustrative "expect (non-)empty" checks
Rename mat "copy" to mat reference
Add more pointer checks
* Add illustrative checks
- Added new graph compile time argument to specify multiple independent
ROIs (Tiles)
- Added new "executable" with serial loop other user specified
ROIs(Tiles)
- refactored graph traversal code into separate function to be called
once
- added saturate cast to Fluid AddCsimple test kernel
G-API planar kernels (#14917)
* Added resizeP with tests
* NV12 planar filters
* fix warnings in ResizeP test
* fix out mat ocv warning
* sz_on - > sz rename
* cpu tests new signature
* try to fix resizeP test
* trailing spaces remove
* doxygen doc fixed
* doxygen minor fix
* more doxygen fixes
* Doxygen corrected and extended after review.
Crosscorr cleanup (#14936)
* Simplify code for convolution destination type/size
For the 2d filter code, destination size equals source size, and the
crossCorr function even (re-)creates the output matrix with the given size.
The number of channels also have to match. The destination type() is the
one used to create the output matrix, so we can use its type() here.
This is a preparatory patch.
Signed-off-by: Stefan Brüns <stefan.bruens@rwth-aachen.de>
* Remove redundant destination size and type parameters from crossCorr
All calling sites of crossCorr already use (...,
mat, mat.size(), mat.type(), ...), so the parameters are redundant.
Signed-off-by: Stefan Brüns <stefan.bruens@rwth-aachen.de>
Due to the explicitly declared copy constructor Vec<T, n>::Vec(Vec <T,n>&)
GCC 9 warns if there is no assignment operator, as having one typically
requires the other (rule-of-three, constructor/desctructor/assginment).
As the values are just a plain array the default assignment operator does
the right thing. Tell the compiler explicitly to default it.
Signed-off-by: Stefan Brüns <stefan.bruens@rwth-aachen.de>