Merge pull request #12522 from mshabunin:remove-va-msdk-34

pull/12526/head
Alexander Alekhin 6 years ago
commit f512bf7004
  1. 2
      CMakeLists.txt
  2. 26
      cmake/OpenCVFindVA_INTEL.cmake
  3. 5
      modules/core/include/opencv2/core/va_intel.hpp

@ -1396,7 +1396,7 @@ if(WITH_VA OR HAVE_VA)
endif() endif()
if(WITH_VA_INTEL OR HAVE_VA_INTEL) if(WITH_VA_INTEL OR HAVE_VA_INTEL)
status(" Intel VA-API/OpenCL:" HAVE_VA_INTEL THEN "YES (MSDK: ${VA_INTEL_MSDK_ROOT} OpenCL: ${VA_INTEL_IOCL_ROOT})" ELSE NO) status(" Intel VA-API/OpenCL:" HAVE_VA_INTEL THEN "YES (OpenCL: ${VA_INTEL_IOCL_ROOT})" ELSE NO)
endif() endif()
if(WITH_LAPACK OR HAVE_LAPACK) if(WITH_LAPACK OR HAVE_LAPACK)

@ -1,30 +1,16 @@
# Main variables: # Main variables:
# VA_INTEL_MSDK_INCLUDE_DIR and VA_INTEL_IOCL_INCLUDE_DIR to use VA_INTEL # VA_INTEL_IOCL_INCLUDE_DIR to use VA_INTEL
# HAVE_VA_INTEL for conditional compilation OpenCV with/without VA_INTEL # HAVE_VA_INTEL for conditional compilation OpenCV with/without VA_INTEL
# VA_INTEL_MSDK_ROOT - root of Intel MSDK installation
# VA_INTEL_IOCL_ROOT - root of Intel OCL installation # VA_INTEL_IOCL_ROOT - root of Intel OCL installation
if(UNIX AND NOT ANDROID) if(UNIX AND NOT ANDROID)
if($ENV{VA_INTEL_MSDK_ROOT})
set(VA_INTEL_MSDK_ROOT $ENV{VA_INTEL_MSDK_ROOT})
else()
set(VA_INTEL_MSDK_ROOT "/opt/intel/mediasdk")
endif()
if($ENV{VA_INTEL_IOCL_ROOT}) if($ENV{VA_INTEL_IOCL_ROOT})
set(VA_INTEL_IOCL_ROOT $ENV{VA_INTEL_IOCL_ROOT}) set(VA_INTEL_IOCL_ROOT $ENV{VA_INTEL_IOCL_ROOT})
else() else()
set(VA_INTEL_IOCL_ROOT "/opt/intel/opencl") set(VA_INTEL_IOCL_ROOT "/opt/intel/opencl")
endif() endif()
find_path(
VA_INTEL_MSDK_INCLUDE_DIR
NAMES mfxdefs.h
PATHS ${VA_INTEL_MSDK_ROOT}
PATH_SUFFIXES include
DOC "Path to Intel MSDK headers")
find_path( find_path(
VA_INTEL_IOCL_INCLUDE_DIR VA_INTEL_IOCL_INCLUDE_DIR
NAMES CL/va_ext.h NAMES CL/va_ext.h
@ -33,12 +19,14 @@ if(UNIX AND NOT ANDROID)
DOC "Path to Intel OpenCL headers") DOC "Path to Intel OpenCL headers")
endif() endif()
if(VA_INTEL_MSDK_INCLUDE_DIR AND VA_INTEL_IOCL_INCLUDE_DIR) if(VA_INTEL_IOCL_INCLUDE_DIR)
set(HAVE_VA_INTEL TRUE) set(HAVE_VA_INTEL TRUE)
set(VA_INTEL_LIBRARIES "-lva" "-lva-drm") if(NOT DEFINED VA_INTEL_LIBRARIES)
set(VA_INTEL_LIBRARIES "va" "va-drm")
endif()
else() else()
set(HAVE_VA_INTEL FALSE) set(HAVE_VA_INTEL FALSE)
message(WARNING "Intel MSDK & OpenCL installation is not found.") message(WARNING "Intel OpenCL installation is not found.")
endif() endif()
mark_as_advanced(FORCE VA_INTEL_MSDK_INCLUDE_DIR VA_INTEL_IOCL_INCLUDE_DIR) mark_as_advanced(FORCE VA_INTEL_IOCL_INCLUDE_DIR)

@ -31,8 +31,9 @@ This section describes Intel VA-API/OpenCL (CL-VA) interoperability.
To enable CL-VA interoperability support, configure OpenCV using CMake with WITH_VA_INTEL=ON . Currently VA-API is To enable CL-VA interoperability support, configure OpenCV using CMake with WITH_VA_INTEL=ON . Currently VA-API is
supported on Linux only. You should also install Intel Media Server Studio (MSS) to use this feature. You may supported on Linux only. You should also install Intel Media Server Studio (MSS) to use this feature. You may
have to specify the path(s) to MSS components for cmake in environment variables: VA_INTEL_MSDK_ROOT for Media SDK have to specify the path(s) to MSS components for cmake in environment variables:
(default is "/opt/intel/mediasdk"), and VA_INTEL_IOCL_ROOT for Intel OpenCL (default is "/opt/intel/opencl").
- VA_INTEL_IOCL_ROOT for Intel OpenCL (default is "/opt/intel/opencl").
To use CL-VA interoperability you should first create VADisplay (libva), and then call initializeContextFromVA() To use CL-VA interoperability you should first create VADisplay (libva), and then call initializeContextFromVA()
function to create OpenCL context and set up interoperability. function to create OpenCL context and set up interoperability.

Loading…
Cancel
Save