Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of gr-peach-opencv-project-sd-card by
va_intel.hpp
00001 // This file is part of OpenCV project. 00002 // It is subject to the license terms in the LICENSE file found in the top-level directory 00003 // of this distribution and at http://opencv.org/license.html. 00004 00005 // Copyright (C) 2015, Itseez, Inc., all rights reserved. 00006 // Third party copyrights are property of their respective owners. 00007 00008 #ifndef __OPENCV_CORE_VA_INTEL_HPP__ 00009 #define __OPENCV_CORE_VA_INTEL_HPP__ 00010 00011 #ifndef __cplusplus 00012 # error va_intel.hpp header must be compiled as C++ 00013 #endif 00014 00015 #include "opencv2/core.hpp" 00016 00017 #ifdef HAVE_OPENCL 00018 #include "ocl.hpp" 00019 #endif 00020 00021 #if defined(HAVE_VA) 00022 # include "va/va.h" 00023 #else // HAVE_VA 00024 # if !defined(_VA_H_) 00025 typedef void* VADisplay; 00026 typedef unsigned int VASurfaceID; 00027 # endif // !_VA_H_ 00028 #endif // HAVE_VA 00029 00030 namespace cv { namespace va_intel { 00031 00032 /** @addtogroup core_va_intel 00033 This section describes Intel VA-API/OpenCL (CL-VA) interoperability. 00034 00035 To enable CL-VA interoperability support, configure OpenCV using CMake with WITH_VA_INTEL=ON . Currently VA-API is 00036 supported on Linux only. You should also install Intel Media Server Studio (MSS) to use this feature. You may 00037 have to specify the path(s) to MSS components for cmake in environment variables: VA_INTEL_MSDK_ROOT for Media SDK 00038 (default is "/opt/intel/mediasdk"), and VA_INTEL_IOCL_ROOT for Intel OpenCL (default is "/opt/intel/opencl"). 00039 00040 To use CL-VA interoperability you should first create VADisplay (libva), and then call initializeContextFromVA() 00041 function to create OpenCL context and set up interoperability. 00042 */ 00043 //! @{ 00044 00045 /////////////////// CL-VA Interoperability Functions /////////////////// 00046 00047 #ifdef HAVE_OPENCL 00048 namespace ocl { 00049 using namespace cv::ocl; 00050 00051 // TODO static functions in the Context class 00052 /** @brief Creates OpenCL context from VA. 00053 @param display - VADisplay for which CL interop should be established. 00054 @param tryInterop - try to set up for interoperability, if true; set up for use slow copy if false. 00055 @return Returns reference to OpenCL Context 00056 */ 00057 CV_EXPORTS Context& initializeContextFromVA(VADisplay display, bool tryInterop = true); 00058 00059 } // namespace cv::va_intel::ocl 00060 #endif 00061 /** @brief Converts InputArray to VASurfaceID object. 00062 @param display - VADisplay object. 00063 @param src - source InputArray. 00064 @param surface - destination VASurfaceID object. 00065 @param size - size of image represented by VASurfaceID object. 00066 */ 00067 CV_EXPORTS void convertToVASurface(VADisplay display, InputArray src, VASurfaceID surface, Size size); 00068 00069 /** @brief Converts VASurfaceID object to OutputArray. 00070 @param display - VADisplay object. 00071 @param surface - source VASurfaceID object. 00072 @param size - size of image represented by VASurfaceID object. 00073 @param dst - destination OutputArray. 00074 */ 00075 CV_EXPORTS void convertFromVASurface(VADisplay display, VASurfaceID surface, Size size, OutputArray dst); 00076 00077 //! @} 00078 00079 }} // namespace cv::va_intel 00080 00081 #endif /* __OPENCV_CORE_VA_INTEL_HPP__ */ 00082
Generated on Tue Jul 12 2022 14:47:51 by
1.7.2
