Intel VA-API/OpenCL (CL-VA) interoperability

Overview

This section describes Intel VA-API/OpenCL (CL-VA) interoperability. More…

// namespaces

namespace cv::va_intel::ocl;

// global functions

void
cv::va_intel::convertFromVASurface(
    VADisplay display,
    VASurfaceID surface,
    Size size,
    OutputArray dst
    );

void
cv::va_intel::convertToVASurface(
    VADisplay display,
    InputArray src,
    VASurfaceID surface,
    Size size
    );

Detailed Documentation

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 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 (default is “/opt/intel/mediasdk”), and 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() function to create OpenCL context and set up interoperability.

Global Functions

void
cv::va_intel::convertFromVASurface(
    VADisplay display,
    VASurfaceID surface,
    Size size,
    OutputArray dst
    )

Converts VASurfaceID object to OutputArray.

Parameters:

display
  • VADisplay object.
surface
  • source VASurfaceID object.
size
  • size of image represented by VASurfaceID object.
dst
  • destination OutputArray.
void
cv::va_intel::convertToVASurface(
    VADisplay display,
    InputArray src,
    VASurfaceID surface,
    Size size
    )

Converts InputArray to VASurfaceID object.

Parameters:

display
  • VADisplay object.
src
  • source InputArray.
surface
  • destination VASurfaceID object.
size
  • size of image represented by VASurfaceID object.