Intel® oneAPI Video Processing Library Installation Guide

ID 标签 687535
已更新 3/25/2021
版本 Latest
公共

author-image

作者

Introduction

oneVPL is a development toolkit to enable the video codec accelerator on different platforms, it is also the successor to Intel® Media SDK. To keep the unified API as well as the compatibility of oneVPL with the current Intel® Media SDK product, oneVPL provides a flexible packaging scheme and offers a separate installation for each package.

Read a brief description of oneVPL architecture and packages to better understand the details of oneVPL installation. If you already decided on the installation path, you may skip the following sections and go directly to the installation process.

Intended Audience

The deployment of oneVPL addresses the following personas, each with their own user perspective:

Developer

Developers compile code that calls oneVPL functions. oneVPL headers must be available to include and oneVPL dispatcher library must be available to link. oneVPL provides samples for code examples as well as tools to test the implementations and explore oneVPL APIs.

Note: If you are currently using Intel® Media SDK as a developer, read about upgrading from Intel® Media SDK to oneVPL to understand the options based on your next steps.

End user

End users are the users of applications for which oneVPL is a prerequisite dependency. In this case, only runtime components are required to be installed.

Note: If you are an end user of Intel® Media SDK, follow the Intel® Media SDK installation steps to install the new Intel® Media SDK library.

Architecture

This is the high-level architecture of oneVPL product:

As shown on the diagram, oneVPL has an API layer and an Implementation layer. The unified API allows applications to access different libraries either without modifying the source code at all or with only a minor modification. The library for a specific accelerator depends on the platform installed, which means that oneVPL only includes the CPU library by default. The other libraries can be installed separately based on the need of the platform and application.

The API layer is packaged as a developer package. The implementation library is called “runtime library” or “runtime”. Intel® Media SDK is the GPU runtime.

The following deliveries are available for oneVPL deployment:

  • oneVPL release packages: developer package, CPU runtime, sample code, and pre-built tools. It is also called oneVPL default package.
  • oneVPL source code
  • oneVPL sample code
    • Note: The source code of the oneVPL sample code is published on GitHub together with the oneAPI samples.

  • Intel® Media SDK release: GPU runtime
  • Intel® Media SDK source code:
    • Note: The source code has been released on GitHub since 2017.

Installation Paths

The installation paths are different for each persona. The main difference is that when you install oneVPL packages as an end user, you are only required to install the runtime package.

Installation Paths for Developers

As a developer, you should follow these steps to install oneVPL:

  1. Decide on an installation method
    • Check hardware support
    • Check OS support
  2. Choose installation method
    • Use a binary package
    • Use platform-specific channels (Nuget, APT, and others)
    • Build from source code
  3. Install default package
    • Developer Package
    • CPU Runtime
    • Sample code
  4. Install other package
    • Graphic drivers
    • GPU Runtime

Refer to the table below to choose the operating system and the hardware platform:

  Linux Windows
CPU Refer to oneVPL system requirements Windows 10
GPU Ubuntu 20.04 Windows 10

Installation Paths for End Users

As an end user, you should follow these steps to install oneVPL:

  1. Decide on an installation method
    • Check Hardware support
    • Check OS support    
  2. Install Runtime
    • Install CPU runtime
    • Install GPU runtime
  3. Install an application
    • Install a third party application
    • Install an application framework

Choose an Installation Approach

The following sections in this document cover developer and end user installation for CPU and GPU.

CPU Components

Approach When to use
Install CPU Implementation of oneVPL with Intel® oneAPI Base Toolkit If you are working with several oneAPI components.
Install CPU Implementation of oneVPL as a stand-alone oneAPI component If only oneVPL is needed.
Install CPU Implementation of oneVPL from NuGet If NuGet dependency management is needed.
Install CPU Implementation of oneVPL from Open Source If a project needs access to the source instead of precompiled libraries.

For more alternatives, refer to other installation methods in oneAPI Base Toolkit installation guide.

GPU Components

Approach When to use
Install Intel Graphics runtime and development packages If you are using runtimes and graphics stack without modification. This is the recommended installation option for most cases because package manager assists with the correct graphics stack installation.
Install GPU Implementation of oneVPL from Open Source If your application is modifying runtimes or graphics stack. You may have to build multiple stack components from source to use this approach.


After the release package, we describe the GPU runtime installation on Linux. To install GPU runtime on Windows, refer to Intel® Media SDK download page.

Install CPU Implementation of oneVPL with Intel® oneAPI Base Toolkit

  1. Go to oneVPL home page and click “Get it Now”. It will take you to Intel® oneAPI Base Toolkit download page.
  2. Select the operating system.
  3. Select “Web&Local” as the distribution.
  4. Select the installer, either “Online” or “Local”. With the local installer, you will get the default package with all components. Online installer allows you to customize the toolkit for it to better fit your needs.

  5. Log in to download the installer for the chosen operating system.
  6. Launch the downloaded executable file.
  7. Once the installation wizard is launched, follow the instructions to install the toolkit.

See Also

Install CPU Implementation of oneVPL as a stand-alone oneAPI component

  1. Go to oneVPL home page.
  2. Scroll down to the bottom of the page and click “Download”. This will take you to the oneVPL component installation page.
  3. Choose the installation package for the desired operating system (Windows* or Linux*) with the preferred type of installer (Online or Local) to start the downloading process.

  4. Launch the downloader.
  5. Once the installation wizard is launched, follow the instruction to install oneVPL as a single component.

Install CPU Implementation of oneVPL from NuGet

NuGet is a package manager used by Microsoft Visual Studio. It can be installed from VS 2017 or later. For details, refer to Microsoft documentation for NuGet Installer. There are two ways to install oneVPL packages from NuGet.

Using NuGet CLI

If you do not have Microsoft Visual Studio and want to use command line console, use NuGet CLI:

  1. Go to nuget.org to download nuget.exe. This is the binary to run NuGet.
  2. To list all package, run:
    nuget list onevpl
    You will see the list of available oneVPL packages: 
    onevpl.devel.linux-x64  2021.1.1.66
    onevpl.devel.win-x64  2021.1.1.76
    onevpl.runtime.linux-x64  2021.1.1.66
    onevpl.runtime.win-x64  2021.1.1.76
  3. To install the package, use the following command: nuget install <package name>. For example:
    nuget install onevpl.devel.win-x64
    nuget install oneVPL.runtimewin-x64

Using Package Manager UI

  1. Open your project in Microsoft Visual Studio.
  2. In Solution Explorer, right-click either References or a project, and select Manage NuGet Packages for Solution…
  3. In the search bar, use “oneVPL” as a keyword to search for the list of available oneVPL packages.
  4. On the right side, click “Install” button. The package will be installed to the same directory as the solution file.

Using Package Manager Console

  1. Open Visual Studio.
  2. In Tools menu, open “Package manager Console”.

     

  3. In a NuGet console, search for oneVPL packages using find-package command:
    find-package onevpl
    You will see the list of available oneVPL packages:
    PM> find-package onevpl
    Id                                  Versions       Description                                                                                    
    --                                  --------        -----------                                                                                    
    onevpl.runtime.win-x64           {2021.1.1.76}     Runtime environment for oneVPL on 64-bit Windows                                                
    onevpl.devel.win-x64             {2021.1.1.76}     Development environment for oneVPL on 64-bit Windows                                            
    onevpl.runtime.linux-x64         {2021.1.1.66}     Runtime environment for oneVPL on 64-bit Linux                                                  
    onevpl.devel.linux-x64           {2021.1.1.66}     Development environment for oneVPL on 64-bit Linux                                              
    Time Elapsed: 00:00:00.8533599
  4. To install oneVPL, use the install-package command with the package name that you want to install. For example:
    install-package onevpl.devel.win-x64

The package will be installed to the same directory as the solution file.

See Also

Install CPU Implementation of oneVPL from Open Source

To install oneVPL from the source code, you have to install its API and dispatcher and the runtime library.

Note: Only CPU runtime library is included in 2021.2.2 release, so the installation process for runtime library will only have the CPU part.

Follow installation instructions on Github to build oneVPL from the source code.

Install Intel Graphics runtime and development packages

Install Graphics runtime on Windows

oneVPL Graphic runtime library is included in the graphic driver version older than 30.0.100.9805. The package can be download from Intel Download Center. Here are the installation steps:

  1. Go to Intel Download Center homepage, click “Graphics” product button.
  2. In the results table, find the graphic driver older than 30.0.100.9805. Сlick the driver link or “View Details” button go to the download page.
  3. Click to download the executable file.
  4. Open the executable to start the installation process for a graphic driver. Follow the wizard to complete the process.
  5. Confirm the installation:
    1. Press a key combination Windows + x and select “Device Manager”.
    2. Unfold the “Display adapters” node.
    3. Click the graphic adapter node.
    4. Select “Driver” tab and check the driver version.
      .

Install Graphics runtime on Linux

  1. Check prerequisites:
    Hardware Intel Core process 11 generation and above, Intel Xe Max discrete graphic and above
    Driver versions Release 20210817 and above
    Released components Click the latest release link to check the full package list
    Support OS Go to the release page for the full Linux distribution list supported
  2. Install the latest oneVPL release
    Note that the following steps are based on the GPDPU Installation Guide for Ubuntu 20.04, for other distributions, please go to the GPGPU Installation Guide for the target distribution.
  3. Add package repository:
    sudo apt-get install -y gpg-agent wget
    wget -qO - https://repositories.intel.com/graphics/intel-graphics.key | sudo apt-key add -
    sudo apt-add-repository 'deb [arch=amd64] https://repositories.intel.com/graphics/ubuntu focal main'
    
  4. Install runtime packages:
    sudo apt-get update
    sudo apt-get install intel-opencl-icd intel-level-zero-gpu level-zero intel-media-va-driver-non-free libmfx1
    
  5. Install oneVPL GPU implementation:
    sudo apt-get install libmfxgen1

    This step may not be in GPGPU installation guide.

  6. [Optional] Install developer package:
    sudo apt-get install libigc-dev intel-igc-cm libigdfcl-dev libigfxcmrt-dev level-zero-dev
  7. Configure permissions:
    Lstat -c “%G” /dev/dri/render*
    groups ${USER}
    sudo gpasswd -a ${USER} render
    newgrp render
    
  8. Prepare the installation check:
    1. Go to the oneVPL installation directory. By default, /opt/intel/oneAPI/vpl/latest.
    2. Copy bin and examples directories to a local directory.
    3. Change the directory to bin directory.
  9. Check Installation.
    See the test case and expected results below: the library name “mfx-gen” and API version 2.3 for oneVPL GPU implementation were installed.
    # source /opt/intel/oneapi/setvars.sh
    :: initializing oneAPI environment ...
       bash: BASH_VERSION = 5.0.17(1)-release
    :: advisor -- latest
    :: ccl -- latest
    :: compiler -- latest
    :: dal -- latest
    :: debugger -- latest
    :: dev-utilities -- latest
    :: dnnl -- latest
    :: dpcpp-ct -- latest
    :: dpl -- latest
    :: intelpython -- latest
    :: ipp -- latest
    :: ippcp -- latest
    :: ipp -- latest
    :: mkl -- latest
    :: mpi -- latest
    :: tbb -- latest
    :: vpl -- latest
    :: vtune -- latest
    :: oneAPI environment initialized ::groups ${USER}
    # ./vpl-inspect |grep Implementation
    ……
    Implementation #0: mfx-gen
    Implementation #1: oneAPI VPL CPU Reference Impl
    # ./sample_encode h265 -i ../examples/content/cars_128x96.nv12 -w 128 -h 96 -o out.h265 -hw -api2x_dispatcher
    libva info: VA-API version 1.11.0
    libva info: User environment variable requested driver 'iHD'
    libva info: Trying to open /opt/intel/mediasdk/lib64/iHD_drv_video.so
    libva info: Found init function __vaDriverInit_1_11
    libva info: va_openDriver() returns 0
    libva info: VA-API version 1.11.0
    libva info: User environment variable requested driver 'iHD'
    libva info: Trying to open /opt/intel/mediasdk/lib64/iHD_drv_video.so
    libva info: Found init function __vaDriverInit_1_11
    libva info: va_openDriver() returns 0
    Encoding Sample Version 8.4.27.0
    
    Input file format YUV420
    Output video HEVC
    Source picture:
    Resolution 128x96
    Crop X,Y,W,H 0,0,128,96
    Destination picture:
    Resolution 128x96
    Crop X,Y,W,H 0,0,128,96
    Frame rate 30.00
    Bit rate(Kbps) 62
    Gop size 65535
    Ref dist 4
    Ref number 3
    Idr Interval 0
    Target usage balanced
    Memory type system
    Media SDK impl hw
    Media SDK version 2.3
    
    Processing started
    Frame number: 60
    Encoding fps: 1526
    
    Processing finished
    

Install GPU Implementation of oneVPL from Open Source

GPU implementation of oneVPL depends on several packages, which are identified and checked for the proper version during configuration stage. Make sure to install these packages to satisfy the requirements.

Prerequisites

Check system requirements for GPU implementation of oneVPL.

Build Steps

Follow build instructions on Github to build GPU implementation of oneVPL from the source code.

"