EstervQrCode 1.1.1
Library for qr code manipulation
directx.hpp
1 /*M///////////////////////////////////////////////////////////////////////////////////////
2 //
3 // IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.
4 //
5 // By downloading, copying, installing or using the software you agree to this license.
6 // If you do not agree to this license, do not download, install,
7 // copy or use the software.
8 //
9 //
10 // License Agreement
11 // For Open Source Computer Vision Library
12 //
13 // Copyright (C) 2010-2013, Advanced Micro Devices, Inc., all rights reserved.
14 // Third party copyrights are property of their respective owners.
15 //
16 // Redistribution and use in source and binary forms, with or without modification,
17 // are permitted provided that the following conditions are met:
18 //
19 // * Redistribution's of source code must retain the above copyright notice,
20 // this list of conditions and the following disclaimer.
21 //
22 // * Redistribution's in binary form must reproduce the above copyright notice,
23 // this list of conditions and the following disclaimer in the documentation
24 // and/or other materials provided with the distribution.
25 //
26 // * The name of the copyright holders may not be used to endorse or promote products
27 // derived from this software without specific prior written permission.
28 //
29 // This software is provided by the copyright holders and contributors as is and
30 // any express or implied warranties, including, but not limited to, the implied
31 // warranties of merchantability and fitness for a particular purpose are disclaimed.
32 // In no event shall the copyright holders or contributors be liable for any direct,
33 // indirect, incidental, special, exemplary, or consequential damages
34 // (including, but not limited to, procurement of substitute goods or services;
35 // loss of use, data, or profits; or business interruption) however caused
36 // and on any theory of liability, whether in contract, strict liability,
37 // or tort (including negligence or otherwise) arising in any way out of
38 // the use of this software, even if advised of the possibility of such damage.
39 //
40 //M*/
41 
42 #ifndef OPENCV_CORE_DIRECTX_HPP
43 #define OPENCV_CORE_DIRECTX_HPP
44 
45 #include "mat.hpp"
46 #include "ocl.hpp"
47 
48 #if !defined(__d3d11_h__)
49 struct ID3D11Device;
50 struct ID3D11Texture2D;
51 #endif
52 
53 #if !defined(__d3d10_h__)
54 struct ID3D10Device;
55 struct ID3D10Texture2D;
56 #endif
57 
58 #if !defined(_D3D9_H_)
59 struct IDirect3DDevice9;
60 struct IDirect3DDevice9Ex;
61 struct IDirect3DSurface9;
62 #endif
63 
64 
65 namespace cv { namespace directx {
66 
67 namespace ocl {
68 using namespace cv::ocl;
69 
71 // This section describes OpenCL and DirectX interoperability.
72 //
73 // To enable DirectX support, configure OpenCV using CMake with WITH_DIRECTX=ON . Note, DirectX is
74 // supported only on Windows.
75 //
76 // To use OpenCL functionality you should first initialize OpenCL context from DirectX resource.
77 //
79 
80 // TODO static functions in the Context class
82 //
86 
88 //
92 
94 //
97 CV_EXPORTS Context& initializeContextFromDirect3DDevice9Ex(IDirect3DDevice9Ex* pDirect3DDevice9Ex);
98 
100 //
103 CV_EXPORTS Context& initializeContextFromDirect3DDevice9(IDirect3DDevice9* pDirect3DDevice9);
104 
106 
107 } // namespace cv::directx::ocl
108 
111 
114 //
117 //
120 CV_EXPORTS void convertToD3D11Texture2D(InputArray src, ID3D11Texture2D* pD3D11Texture2D);
121 
124 //
127 //
130 CV_EXPORTS void convertFromD3D11Texture2D(ID3D11Texture2D* pD3D11Texture2D, OutputArray dst);
131 
133 //
136 //
139 CV_EXPORTS void convertToD3D10Texture2D(InputArray src, ID3D10Texture2D* pD3D10Texture2D);
140 
142 //
145 //
148 CV_EXPORTS void convertFromD3D10Texture2D(ID3D10Texture2D* pD3D10Texture2D, OutputArray dst);
149 
151 //
154 //
158 CV_EXPORTS void convertToDirect3DSurface9(InputArray src, IDirect3DSurface9* pDirect3DSurface9, void* surfaceSharedHandle = NULL);
159 
161 //
164 //
168 CV_EXPORTS void convertFromDirect3DSurface9(IDirect3DSurface9* pDirect3DSurface9, OutputArray dst, void* surfaceSharedHandle = NULL);
169 
173 CV_EXPORTS int getTypeFromDXGI_FORMAT(const int iDXGI_FORMAT); // enum DXGI_FORMAT for D3D10/D3D11
174 
178 CV_EXPORTS int getTypeFromD3DFORMAT(const int iD3DFORMAT); // enum D3DTYPE for D3D9
179 
181 
182 } } // namespace cv::directx
183 
184 #endif // OPENCV_CORE_DIRECTX_HPP
This type is very similar to InputArray except that it is used for input/output and output function p...
Definition: mat.hpp:296
Definition: ocl.hpp:259
CV__DEBUG_NS_END typedef const _InputArray & InputArray
Definition: mat.hpp:442
CV_EXPORTS Context & initializeContextFromDirect3DDevice9Ex(IDirect3DDevice9Ex *pDirect3DDevice9Ex)
Creates OpenCL context from Direct3DDevice9Ex device.
CV_EXPORTS Context & initializeContextFromD3D11Device(ID3D11Device *pD3D11Device)
Creates OpenCL context from D3D11 device.
CV_EXPORTS void convertToDirect3DSurface9(InputArray src, IDirect3DSurface9 *pDirect3DSurface9, void *surfaceSharedHandle=NULL)
Converts InputArray to IDirect3DSurface9.
CV_EXPORTS Context & initializeContextFromDirect3DDevice9(IDirect3DDevice9 *pDirect3DDevice9)
Creates OpenCL context from Direct3DDevice9 device.
CV_EXPORTS void convertFromD3D10Texture2D(ID3D10Texture2D *pD3D10Texture2D, OutputArray dst)
Converts ID3D10Texture2D to OutputArray.
CV_EXPORTS void convertToD3D11Texture2D(InputArray src, ID3D11Texture2D *pD3D11Texture2D)
Converts InputArray to ID3D11Texture2D. If destination texture format is DXGI_FORMAT_NV12 then input ...
CV_EXPORTS void convertFromDirect3DSurface9(IDirect3DSurface9 *pDirect3DSurface9, OutputArray dst, void *surfaceSharedHandle=NULL)
Converts IDirect3DSurface9 to OutputArray.
CV_EXPORTS int getTypeFromD3DFORMAT(const int iD3DFORMAT)
Get OpenCV type from DirectX type.
CV_EXPORTS void convertToD3D10Texture2D(InputArray src, ID3D10Texture2D *pD3D10Texture2D)
Converts InputArray to ID3D10Texture2D.
CV_EXPORTS int getTypeFromDXGI_FORMAT(const int iDXGI_FORMAT)
Get OpenCV type from DirectX type.
CV_EXPORTS void convertFromD3D11Texture2D(ID3D11Texture2D *pD3D11Texture2D, OutputArray dst)
Converts ID3D11Texture2D to OutputArray. If input texture format is DXGI_FORMAT_NV12 then data will b...
CV_EXPORTS Context & initializeContextFromD3D10Device(ID3D10Device *pD3D10Device)
Creates OpenCL context from D3D10 device.
#define CV_EXPORTS
Definition: cvdef.h:435
OutputArray dst
Definition: imgproc.hpp:3564
Definition: ocl.hpp:49
"black box" representation of the file storage associated with a file on disk.
Definition: calib3d.hpp:441