* Add CUDA support for D3D11 interop. #13888
color_detail.hpp: fixed build error : dynamic initialization is not supported for a __constant__ variable.
directx.cpp: Add CUDA support(cl_nv_d3d11_sharing) for D3D11 interop. #13888
Update directx.cpp
Format adjustment.
Update directx.cpp
fix error.
Update directx.cpp
Format adjustment
Update directx.cpp
fix trailing whitespace.
fix format errors
convert indentation to spaces .
Trim trailing whitespace.
Add information about source of cl_d3d11_ext.h
Avoid unrelated changes.
Increase compile-time conditional judgment.
Increase the judgment of whether the OCL device has the required extensions at compile time.
Add compilation option `HAVE_CLNVEXT`.Check CL support in runtime.
Check result of `clGetExtensionFunctionAddressForPlatform` for KHR is invalid.It always can get the address(from OpenCL.dll),So I check NV support(from nvopencl64.dll) before KHR when `HAVE_CLNVEXT` is enabled.
Delete cl_d3d11_ext.h
Modified parameter list
fix "cannot open include file: 'CL/cl_d3d11_ext.h'"
remove not referenced var
fix C2143: syntax error
Improve compile-time judgment.
dlrectx.cpp Modify the detection order.
initializeContextFromD3D11Device:
```
// try with NV(Need to check it first)
// try with KHR
```
fix warnig C4100
Revert "fix warnig C4100"
This reverts commit 76e5becb67780071d0cbde61cc4f5f807ad7c5ac.
fix warning C4100
fix warning C4505
Format alignment
Format adjustment and automatically detect header files.
Automatically detect header files when users are not configured or configuration errors occur.
avoid unrelated changes.
Update .cmake
Update .cmake
* fix build errors
* fix warning:defined but not used
* Revert "fix warning:defined but not used"
This reverts commit 7ab3537cd0.
* fix warning:defined but not used
* fix build error for mac
* fix build error for win
* optimizing branch judgment
* Revert "optimizing branch judgment"
This reverts commit 88b72b870e.
* fix warning C4702: unreachable code
* remove unused code
* Fix problems that may lead to undefined behavior
* Add status check
* fix error C2664,C2665 : cannot convert argument
* Format adjustment
VSCODE will automatically format the indentation to 4 spaces in some situation.
* fix error C2440
* fix error C2440
* add cl_d3d11_ext.h
* Format adjustment
* remove unnecessary checks
details: https://github.com/opencv/opencv/pull/13726
In order to help CMake and PkgConfig find FFmpeg you need to:
1) export `PKG_CONFIG_LIBDIR=${SYSROOT}`
where `SYSROOT=${ANDROID_NDK}/sysroot`
2) Add `-DCMAKE_PREFIX_PATH=${FFMPEG_INSTALL_PREFIX}`
3) Append `-DCMAKE_FIND_ROOT_PATH=${FFMPEG_INSTALL_PREFIX}`
- add infrastructure support for Power9/VSX3
- fix missing VSX flags on GCC4.9 and CLANG4(#13210, #13222)
- fix disable VSX optimzation on GCC by using flag ENABLE_VSX
- flag ENABLE_VSX is deprecated now, use CPU_BASELINE, CPU_DISPATCH instead
- add VSX3 to arithmetic dispatchable flags
cap_libv4l depends on an external library (libv4l) yet is still larger
(1966 loc vs 1822 loc).
It was initially introduced copy pasting cap_v4l in order to offload
various color conversions to libv4l.
However nowadays we handle most of the needed color conversions inside
OpenCV. Our own implementation is better tested and (probably) also
better performing. (as it can optionally leverage IPP/ OpenCL)
Currently cap_v4l is better maintained and generally the code is in
better shape. There is however an API
difference in getting unconverted frames:
* on cap_libv4l one need to set `CV_CAP_MODE_GRAY=1` or
`CV_CAP_MODE_YUYV=1`
* on cap_v4l one needs to set `CV_CAP_PROP_CONVERT_RGB=0`
the latter is more flexible though as it also allows accessing undecoded
JPEG images.
fixes#4563
* dnn: Add a Vulkan based backend
This commit adds a new backend "DNN_BACKEND_VKCOM" and a
new target "DNN_TARGET_VULKAN". VKCOM means vulkan based
computation library.
This backend uses Vulkan API and SPIR-V shaders to do
the inference computation for layers. The layer types
that implemented in DNN_BACKEND_VKCOM include:
Conv, Concat, ReLU, LRN, PriorBox, Softmax, MaxPooling,
AvePooling, Permute
This is just a beginning work for Vulkan in OpenCV DNN,
more layer types will be supported and performance
tuning is on the way.
Signed-off-by: Wu Zhiwen <zhiwen.wu@intel.com>
* dnn/vulkan: Add FindVulkan.cmake to detect Vulkan SDK
In order to build dnn with Vulkan support, need installing
Vulkan SDK and setting environment variable "VULKAN_SDK" and
add "-DWITH_VULKAN=ON" to cmake command.
You can download Vulkan SDK from:
https://vulkan.lunarg.com/sdk/home#linux
For how to install, see
https://vulkan.lunarg.com/doc/sdk/latest/linux/getting_started.htmlhttps://vulkan.lunarg.com/doc/sdk/latest/windows/getting_started.htmlhttps://vulkan.lunarg.com/doc/sdk/latest/mac/getting_started.html
respectively for linux, windows and mac.
To run the vulkan backend, also need installing mesa driver.
On Ubuntu, use this command 'sudo apt-get install mesa-vulkan-drivers'
To test, use command '$BUILD_DIR/bin/opencv_test_dnn --gtest_filter=*VkCom*'
Signed-off-by: Wu Zhiwen <zhiwen.wu@intel.com>
* dnn/Vulkan: dynamically load Vulkan runtime
No compile-time dependency on Vulkan library.
If Vulkan runtime is unavailable, fallback to CPU path.
Use environment "OPENCL_VULKAN_RUNTIME" to specify path to your
own vulkan runtime library.
Signed-off-by: Wu Zhiwen <zhiwen.wu@intel.com>
* dnn/Vulkan: Add a python script to compile GLSL shaders to SPIR-V shaders
The SPIR-V shaders are in format of text-based 32-bit hexadecimal
numbers, and inserted into .cpp files as unsigned int32 array.
* dnn/Vulkan: Put Vulkan headers into 3rdparty directory and some other fixes
Vulkan header files are copied from
https://github.com/KhronosGroup/Vulkan-Docs/tree/master/include/vulkan
to 3rdparty/include
Fix the Copyright declaration issue.
Refine OpenCVDetectVulkan.cmake
* dnn/Vulkan: Add vulkan backend tests into existing ones.
Also fixed some test failures.
- Don't use bool variable as uniform for shader
- Fix dispathed group number beyond max issue
- Bypass "group > 1" convolution. This should be support in future.
* dnn/Vulkan: Fix multiple initialization in one thread.
* Add HPX backend for OpenCV implementation
Adds hpx backend for cv::parallel_for_() calls respecting the nstripes chunking parameter. C++ code for the backend is added to modules/core/parallel.cpp. Also, the necessary changes to cmake files are introduced.
Backend can operate in 2 versions (selectable by cmake build option WITH_HPX_STARTSTOP): hpx (runtime always on) and hpx_startstop (start and stop the backend for each cv::parallel_for_() call)
* WIP: Conditionally include hpx_main.hpp to tests in core module
Header hpx_main.hpp is included to both core/perf/perf_main.cpp and core/test/test_main.cpp.
The changes to cmake files for linking hpx library to above mentioned test executalbles are proposed but have issues.
* Add coditional iclusion of hpx_main.hpp to cpp cpu modules
* Remove start/stop version of hpx backend
* created new decoder and encoder for PFM
pfm file format stores binary RGB or grayscale float images.
* added test for pfm codec
* replaced large with short licence header
* little/big-endian-check is now compile time
* fixed width/height confusion, improved big/little endian recognition, fixed scaling issue and Improved signature check
* adapted tests to handle float images well
* removed data-dependency: lena.pfm
the lena image is now loaded is pam and converted to pfm.
* fixed bug in endianess detection macro
* Added endianess detection for android and win
* removed fancy endianess detection
endianess detection will be implemented in cmake scripts soonish.
* fixed minor warnings
* fixed stupid elif defined bug
* silenced some implicit cast warnings
* replaced std::to_string with std::stringstream solution
std::to_string variant did not build on android.
* replaced new endianess macros with existing ones
* improved readability