Skip to content

Commit

Permalink
Release 2021.4.0
Browse files Browse the repository at this point in the history
New in This Release
===================

* Updated dispatcher API to 2.4
* Advanced OpenVINO interop sample w/ remoteBlob support (Linux only)
* C++ API and Samples (Preview)
* Python API and Samples (Preview)
* Added logging capability to Dispatcher
* Added new tools: sample_multi_transcode and decvpp_tool
* Added debug libraries to Windows package

For more information on the preview C++/Python APIs and Samples, see
https://software.intel.com/content/www/us/en/develop/articles/onevpl-preview-examples.html

Issues and Limitations
======================

C++/Python previews
-------------------
* This is a preview release made available to gather feedback for API
  improvements.  Compatibility with future releases is not guaranteed.

Dispatcher
----------
* MFXInit() and MFXInitEx() functions have been deprecated in the 2.0
  oneVPL Specification.  Use MFXLoad() instead.  See the transition
  guide for more details.
* If initialized with MFXInit() or MFXInitEx(), support is limited to
  the 1.x API and will load Intel(R) Media SDK hardware library rather
  than oneVPL hardware library.
* If both Intel(R) Media SDK and oneVPL hardware libraries are
  installed, only oneVPL libraries will be loaded via MFXLoad(). See the
  oneVPL specification for more details.
* The Media SDK runtimes enabling legacy GPU hardware only provide API
  features up to 1.35, even when initialized with MFXLoad.  For more
  details, see [Upgrading from Intel® Media SDK to Intel® oneAPI Video
  Processing
  Library](https://software.intel.com/content/www/us/en/develop/articles/upgrading-from-msdk-to-onevpl.html).
* The libmfx.dll and libmfx.so.2021.1.11 dispatchers are
  deprecated. They are provided for backwards compatibility only and
  will be removed from a future release.  They do not include any
  changes since the 2021.1.1 release.
* Dispatcher support has been extended to include hardware
  implementations, including those that implement API versions lower
  then 2.0. Applications patterned after the 2021.1.1 release samples,
  rather than the 2.0 specification may fail after re-build as the
  previous sample code made the assumption that 2.0 APIs would be
  available. To remedy this please follow the coding patterns in the
  [oneVPL
  spec](https://spec.oneapi.com/versions/latest/elements/oneVPL/source/API_ref/VPL_disp_api_func.html#_CPPv47MFXLoadv)

Tools and samples
-----------------
* Encode B-frame distance setting is inconsistent between CPU and GPU
  implementations. For the CPU implementation 0 means no B-frames, while
  for the GPU implementation 1 means no B-frames.
* Colorspace flags are required when using sample_* tools, if colorspace
  is not set tools will fail.
* Input size should be aligned to 16 bytes for sample_encode.
* The sample_multi_transcode tool included in this release is only
  intended for GPU operation to remain more closely aligned with the
  version of this tool released with Intel(R) Media SDK.
* The sample_multi_transcode tool has a synchronization issue in 1->N
  pipelines. When decode is faster than encoders, the issue can cause
  the free frames consumed faster than the framework released,
  eventually resulting in tool crash when there is no more memory
  available.
* hello-transcode sample only supports the oneVPL CPU implementation in
  this release.
* sample_decode may stop responding if the input is switched between
  multiple resolutions.
* sample_encode occasionally hangs for (CPU) SVT-HEVC encodes when using
  VBR in Ubuntu 18.04.
* sample_encode does not work if the input is scaled or color converted.
* sample_encode, sample_decode, and sample_vpp are not in sync with
  Media SDK's version of these tools.  This will be corrected in future
  releases.
* Windows samples are installed to C:\Program
  Files (x86)\Intel\oneAPI\vpl\latest\examples by default. This should
  not be a writable location, so you will not be able to build samples
  here.  To build examples, copy this folder to another location first.
* When configuring systems to run the OpenVINO interop samples in Linux
  gmmlib version conflicts can occur. Debug shows undefined GmmLib
  symbols as the cause of a runtime error.  This can be mitigated by
  using the media stack integrated with OpenVINO installation.
  Uninstall other versions of libva, iHD, and libgmm then select Media
  SDK when installing OpenVINO as described in the [OpenVINO install
  documentation](https://docs.openvinotoolkit.org/latest/openvino_docs_install_guides_installing_openvino_linux.html#install-openvino).
  • Loading branch information
mav-intel committed Jun 25, 2021
1 parent 17968d8 commit d5c0725
Show file tree
Hide file tree
Showing 297 changed files with 42,280 additions and 12,577 deletions.
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

# force line endings for scripts
*.sh eol=lf
*.sh.in eol=lf
*.py eol=lf
script/* eol=lf
*.bat eol=crlf
Expand Down
4 changes: 4 additions & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Each line is a file pattern followed by one or more owners.
# last matching pattern takes the most precedence.

* @intel-innersource/onevpl-maintainer
42 changes: 27 additions & 15 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
# pre-commit configuration file
# You may automatically run pre-commit when committing
# by installing hooks as follows:
# pre-commit install
# pre-commit install --hook-type commit-msg
---
fail_fast: false
default_language_version:
python: python3
exclude: ^test/unit/googletest/
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v2.5.0
Expand All @@ -12,25 +16,33 @@ repos:
rev: v0.29.0
hooks:
- id: yapf
- repo: https://github.com/pocc/pre-commit-hooks
rev: python
- repo: https://github.com/PyCQA/pylint
rev: v2.8.2
hooks:
- id: clang-format
- id: pylint
args:
[
"--disable=import-error,no-name-in-module,duplicate-code",
]
- repo: https://github.com/iconmaster5326/cmake-format-pre-commit-hook
rev: master
rev: v0.6.9
hooks:
- id: cmake-format
- repo: local
- repo: https://github.com/pocc/pre-commit-hooks
rev: v1.1.1
hooks:
- id: pylint
name: pylint
entry: pylint
language: system
types: [python]
- repo: local
- id: clang-format
args: [-i]
- repo: https://github.com/cpplint/cpplint
rev: 1.5.5
hooks:
- id: cpplint
name: cpplint
entry: cpplint
language: system
files: \.(h|hh|hpp|hxx|h|c|cc|cpp|cxx|c)$
- repo: https://github.com/jorisroovers/gitlint
rev: v0.15.1
hooks:
- id: gitlint
- repo: https://github.com/PyCQA/bandit
rev: 1.7.0
hooks:
- id: bandit
3 changes: 2 additions & 1 deletion .pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,8 @@ disable=print-statement,
deprecated-sys-function,
exception-escape,
comprehension-escape,
R0801
R0801,
no-member

# Enable the message, report, category or checker with the given id(s). You can
# either give multiple identifier separated by comma (,) or put this option
Expand Down
131 changes: 124 additions & 7 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,47 @@ if(NOT CMAKE_BUILD_TYPE)
endif()

# Project options
option(OPTION_COMPILE_PREVIEW_EXAMPLES "Build examples." OFF)
set(BUILD_DISPATCHER
ON
CACHE BOOL "Build dispatcher.")
set(BUILD_DEV
ON
CACHE BOOL "Build files that are only needed for development.")

# Off by default while this is a preview
set(BUILD_PYTHON_BINDING
OFF
CACHE BOOL "Build Python binding.")

option(BUILD_DISPATCHER_ONLY "Build dispatcher only." OFF)
option(BUILD_DEV_ONLY "Build only developer package." OFF)
option(BUILD_PYTHON_BINDING_ONLY "Build only Python binding." OFF)

if(BUILD_DISPATCHER_ONLY)
set(BUILD_DEV OFF)
set(BUILD_PYTHON_BINDING OFF)
endif()
if(BUILD_DEV_ONLY)
set(BUILD_DISPATCHER OFF)
set(BUILD_PYTHON_BINDING OFF)
endif()
if(BUILD_PYTHON_BINDING_ONLY)
set(BUILD_DEV OFF)
set(BUILD_DISPATCHER OFF)
endif()

option(USE_ONEAPI_INSTALL_LAYOUT "Use oneAPI install layout instead of FHS" OFF)

if(USE_ONEAPI_INSTALL_LAYOUT)
set(CMAKE_INSTALL_DOCDIR "documentation")
set(CMAKE_INSTALL_LIBDIR "lib")
set(ONEAPI_INSTALL_ENVDIR "env")
set(ONEAPI_INSTALL_SYSCHECKDIR "sys_check")
set(ONEAPI_INSTALL_MODFILEDIR "modulefiles")
set(ONEAPI_INSTALL_EXAMPLEDIR "examples")
set(ONEAPI_INSTALL_LICENSEDIR "licensing/oneVPL")
set(ONEAPI_INSTALL_PYTHONDIR "python/lib")
endif()

# Set output directories
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR})
Expand All @@ -43,20 +83,97 @@ include(cmake/CompileOptions.cmake)

add_subdirectory(api)
add_subdirectory(dispatcher)
add_subdirectory(env)
add_subdirectory(modulefiles)
add_subdirectory(tools)
add_subdirectory(examples)
if(BUILD_DEV)
add_subdirectory(env)
add_subdirectory(modulefiles)
add_subdirectory(tools)
add_subdirectory(examples)
endif()
add_subdirectory(preview)

install(
FILES third-party-programs.txt
DESTINATION ${CMAKE_INSTALL_LICENSEDIR}
DESTINATION ${ONEAPI_INSTALL_LICENSEDIR}
COMPONENT license)

install(
FILES LICENSE
RENAME license.txt
DESTINATION ${CMAKE_INSTALL_LICENSEDIR}
DESTINATION ${ONEAPI_INSTALL_LICENSEDIR}
COMPONENT license)

if(USE_ONEAPI_INSTALL_LAYOUT)
install(
FILES LICENSE
RENAME license.txt
DESTINATION "licensing"
COMPONENT license)
endif()

include(cmake/PackageTarget.cmake)

message(
STATUS "---------------- Configuration summary ------------------------------"
)
message(STATUS "CMake:")
message(STATUS " CMAKE_VERSION : ${CMAKE_VERSION}")
message(STATUS " CMAKE_GENERATOR : ${CMAKE_GENERATOR}")
message(STATUS " CMAKE_BUILD_TOOL : ${CMAKE_BUILD_TOOL}")
message(STATUS "Target:")
message(STATUS " CMAKE_SYSTEM_NAME : ${CMAKE_SYSTEM_NAME}")
message(STATUS " CMAKE_SYSTEM_VERSION : ${CMAKE_SYSTEM_VERSION}")
message(STATUS " CMAKE_SYSTEM_PROCESSOR : ${CMAKE_SYSTEM_PROCESSOR}")
message(STATUS "General:")
message(STATUS " CMAKE_BUILD_TYPE : ${CMAKE_BUILD_TYPE}")
message(STATUS " CMAKE_TOOLCHAIN_FILE : ${CMAKE_TOOLCHAIN_FILE}")
message(STATUS " CMAKE_C_COMPILER : ${CMAKE_C_COMPILER}")
message(STATUS " CMAKE_CXX_COMPILER : ${CMAKE_CXX_COMPILER}")
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
message(STATUS " Build architecture : 64-bit")
elseif(CMAKE_SIZEOF_VOID_P EQUAL 4)
message(STATUS " Build architecture : 32-bit")
endif()
message(STATUS "Flags:")
message(STATUS " CMAKE_C_FLAGS : ${CMAKE_C_FLAGS}")
message(STATUS " CMAKE_CXX_FLAGS : ${CMAKE_CXX_FLAGS}")
message(STATUS "Release flags:")
message(STATUS " CMAKE_C_FLAGS_RELEASE : ${CMAKE_C_FLAGS_RELEASE}")
message(STATUS " CMAKE_CXX_FLAGS_RELEASE : ${CMAKE_CXX_FLAGS_RELEASE}")
message(STATUS "Debug flags:")
message(STATUS " CMAKE_C_FLAGS_DEBUG : ${CMAKE_C_FLAGS_DEBUG}")
message(STATUS " CMAKE_CXX_FLAGS_DEBUG : ${CMAKE_CXX_FLAGS_DEBUG}")
message(STATUS "RelWithDebRT flags:")
message(
STATUS " CMAKE_C_FLAGS_RELWITHDEBRT : ${CMAKE_C_FLAGS_RELWITHDEBRT}")
message(
STATUS " CMAKE_CXX_FLAGS_RELWITHDEBRT : ${CMAKE_CXX_FLAGS_RELWITHDEBRT}")
message(STATUS "Install:")
message(STATUS " CMAKE_INSTALL_PREFIX : ${CMAKE_INSTALL_PREFIX}")
message(
STATUS " CMAKE_INSTALL_FULL_BINDIR : ${CMAKE_INSTALL_FULL_BINDIR}")
message(
STATUS " CMAKE_INSTALL_FULL_INCLUDEDIR : ${CMAKE_INSTALL_FULL_INCLUDEDIR}")
message(
STATUS " CMAKE_INSTALL_FULL_LIBDIR : ${CMAKE_INSTALL_FULL_LIBDIR}")
message(
STATUS " CMAKE_INSTALL_FULL_DOCDIR : ${CMAKE_INSTALL_FULL_DOCDIR}")
message(
STATUS " ONEAPI_INSTALL_FULL_BIN32DIR : ${ONEAPI_INSTALL_FULL_BIN32DIR}")
message(
STATUS " ONEAPI_INSTALL_FULL_LIB32DIR : ${ONEAPI_INSTALL_FULL_LIB32DIR}")
message(
STATUS " ONEAPI_INSTALL_FULL_ENVDIR : ${ONEAPI_INSTALL_FULL_ENVDIR}")
message(
STATUS " ONEAPI_INSTALL_FULL_SYSCHECKDIR: ${ONEAPI_INSTALL_FULL_SYSCHECKDIR}"
)
message(
STATUS " ONEAPI_INSTALL_FULL_MODFILEDIR : ${ONEAPI_INSTALL_FULL_MODFILEDIR}")
message(
STATUS " ONEAPI_INSTALL_FULL_EXAMPLEDIR : ${ONEAPI_INSTALL_FULL_EXAMPLEDIR}")
message(
STATUS " ONEAPI_INSTALL_FULL_LICENSEDIR : ${ONEAPI_INSTALL_FULL_LICENSEDIR}")
message(
STATUS " ONEAPI_INSTALL_FULL_PYTHONDIR : ${ONEAPI_INSTALL_FULL_PYTHONDIR}")
message(STATUS "Build:")
message(STATUS " BUILD_DEV : ${BUILD_DEV}")
message(STATUS " BUILD_DISPATCHER : ${BUILD_DISPATCHER}")
144 changes: 144 additions & 0 deletions INSTALL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,144 @@
# Build/Install oneAPI Video Processing Library from Source

This document describes how to build from the source code in this repo.
Please note: this repo contains only headers, dispatcher, examples, and tools.
In most cases an implementation must also be installed.

## Prerequisites

To build this project you will need:

- A compiler with C++11 support
- CMake 3.10 or newer

On Windows, you will also need:

- Visual Studio Build Tools 2017
* Visual C++ ATL for x86 and x64
- Visual Studio 2019
* C++ ATL for latest 'X' build tools (x86 & x64)

## Basic build and installation of this package

Build the project with the following commands:

Linux:
```
cd <vpl-repo-clone-location>
export VPL_INSTALL_DIR=`pwd`/_vplbuild
mkdir _build
mkdir $VPL_INSTALL_DIR
cd _build
cmake .. -DCMAKE_INSTALL_PREFIX=$VPL_INSTALL_DIR
cmake --build . --config Release
cmake --build . --config Release --target install
```

Windows DOS cmd prompt:
```
cd <vpl-repo-clone-location>
export VPL_INSTALL_DIR=%cd%/_vplbuild
mkdir _build
mkdir %VPL_INSTALL_DIR%
cd _build
cmake .. -DCMAKE_INSTALL_PREFIX=%VPL_INSTALL_DIR%
cmake --build . --config Release
cmake --build . --config Release --target install
```

You can find the build output in the location chosen for CMAKE_INSTALL_PREFIX, VPL_INSTALL_DIR.

For more build/install information see INSTALL.md

## Helper scripts and options

Additionally, helper scripts are available in the `script` folder to run these cmake commands.
For more details see script/README.md

You can build the project using the helper scripts with the following commands.

First, set VPL_INSTALL_DIR if you wish to override the defaults and supply your own build/install location.
```
cd <vpl-repo-clone-location>
script/bootstrap
script/build
script/install
```
The build script can take an additional argument for 32-bit builds in Windows:
```
script/build -A x86_32
```

Note that on Linux the default vpl install location is /usr/local and may require sudo for write access

Note that on Windows there may be an error with the following message:
```
Cannot open include file: 'atlbase.h': No such file or directory
```
Ensure that the ATL build tools are installed through Visual Studio and that the path to the file is on the include path that the Visual Studio compiler uses

## Getting an Implementation

The base package is limited to the dispatcher and samples. To use oneVPL for video processing you need to install at least one implementation. Current implementations:

- [oneVPL-cpu](https://github.com/oneapi-src/oneVPL-cpu) for use on CPU
- [oneVPL-intel-gpu](https://github.com/oneapi-src/oneVPL-intel-gpu) for use on Intel Xe graphics and newer
- [Media SDK](https://github.com/Intel-Media-SDK/MediaSDK) for use on legacy Intel graphics

Follow the instructions on the respective repos to install the desired implementation

## End-To-End Scripts for oneVPL base and CPU implementation

You can build oneVPL base and CPU implementation with the End-To-End scripts provided in the scripts folder. Refer to the script/README.md for more details regarding the scripts.

These scripts assume oneVPL and oneVPL-cpu are cloned into the same parent folder. They also assume that the prerequisites have been met for their respective platform

Note: `.bat` versions are also provided for Windows.

Note: On Windows the e2e scripts need to first clean intermediate build results that were built outside the script

Use the following commands to run the e2e scripts:

```
cd <vpl-root>
oneVPL/script/e2e/bootstrap
oneVPL/script/e2e/build
```

Optionally you may set the environment variables VPL_INSTALL_DIR and
VPL_BUILD_DEPENDENCIES to specify a location to install the project and to
store the built dependencies respectivly.


```
cd <vpl-root>
export VPL_BUILD_DEPENDENCIES=<dependencies-cache>
export VPL_INSTALL_DIR=<vpl-install-location>
oneVPL/script/e2e/bootstrap
oneVPL/script/e2e/build
```

You can also clear build results by calling the clean script.
Note, if VPL_INSTALL_DIR is set it will be cleared too.


```
cd <vpl-root>
oneVPL/script/e2e/clean
```

A complete rebuild can be forced by cleaning and then rebuilding.

```
cd <vpl-root>
export VPL_BUILD_DEPENDENCIES=<dependencies-cache>
export VPL_INSTALL_DIR=<vpl-install-location>
oneVPL/script/e2e/clean
oneVPL/script/e2e/bootstrap
oneVPL/script/e2e/build
```
Loading

0 comments on commit d5c0725

Please sign in to comment.