Skip to content

Commit cdf7444

Browse files
committed
Release 2021.6.0
New in This Release =================== * Updated dispatcher and CPU runtime to API 2.5 * Internal memory support added to dpcpp-blur sample 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 oneVPL 2021.6.0 has been updated to include functional and security updates. Users should update to the latest version. Issues and Limitations ====================== * On Ubuntu 20.04, during basekit install you may see a warning about missing OpenCL support. You can verify the graphics stack components are correctly installed by running one of the interop samples with -hw. See https://github.com/oneapi-src/oneVPL for more information. C++/Python previews ------------------- * This is a preview release made available to gather feedback for API improvements. Compatibility with future releases is not Dispatcher ---------- * In multi-adapter configurations with a mix of legacy and Xe GPUs, only the oneVPL implementation will be loaded. This means legacy MSDK device(s) cannot be used in this scenario. In this case oneVPL applications should target only the Xe device(s). If an application must target both, use Media SDK dispatcher and choose the default runtime to load with the INTEL_MEDIA_RUNTIME environment variable. See the [Media SDK Readme](https://github.com/Intel-Media-SDK/MediaSDK/blob/master/README.rst#intel-media-sdk) for more information. * Builds of oneVPL from source assume single configuration generators on Linux and multi configuration generators on Windows. * 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 ----------------- * Releases installed prior to the 2.4 API update may cause CMAKE build failures on Linux due to compatibility issues. Prior package versions were aligned with release version, rather than API. As a result find_package will look for a current version i.e. 2.4 but find a larger legacy usage i.e. 2021.2.2 and assume forward compatibility. * decvpp_tool requires the graphics stack installed even when in CPU only mode. * sample_decode may not finish with multi-resolution input in external memory mode with CPU runtime. * sample_encode does not work in case of enabled VPP and internal memory allocator. * legacy-vpp sample in hardware mode is not supported on Sky Lake. * decvpp_tool does not support gen12 platforms on Windows in Hardware mode. * 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. * 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 software mode does not support NV12 as the input color format. Use i420 with the "i420" argument since NV12 is the default format. * sample_encode occasionally hangs for (CPU) SVT-HEVC encodes when using VBR in Ubuntu 18.04. * sample_encode does not support preprocess commands for scaling or color conversion. * 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.
1 parent dde640e commit cdf7444

File tree

117 files changed

+4393
-813
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

117 files changed

+4393
-813
lines changed

CMakeLists.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,9 @@ include(cmake/oneAPIInstallDirs.cmake)
7878
# Keep executable bits on shared objects when installing regardless of distro
7979
set(CMAKE_INSTALL_SO_NO_EXE 0)
8080

81+
# Directory for tools specific helper libraries
82+
set(_TOOLS_LIB_PATH "${CMAKE_INSTALL_FULL_LIBDIR}/${PROJECT_NAME}")
83+
8184
include(cmake/CompileOptions.cmake)
8285

8386
if(BUILD_TESTS)
@@ -117,6 +120,8 @@ if(USE_ONEAPI_INSTALL_LAYOUT)
117120
endif()
118121

119122
include(cmake/PackageTarget.cmake)
123+
set(CMAKE_INSTALL_SYSTEM_RUNTIME_COMPONENT runtime)
124+
include(InstallRequiredSystemLibraries)
120125

121126
message(
122127
STATUS "---------------- Configuration summary ------------------------------"

README.md

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# oneAPI Video Processing Library
1+
# ![oneAPI](assets/oneapi-logo.png "oneAPI") Video Processing Library
22

33
The oneAPI Video Processing Library (oneVPL) provides a single video processing
44
API for encode, decode, and video processing that works across a wide range of
@@ -11,9 +11,9 @@ This repository contains the following components of oneVPL:
1111
- Examples demonstrating API usage
1212
- oneVPL command line tools
1313

14-
This project is part of the larger [oneAPI](https://www.oneapi.com/) project.
15-
See the [oneAPI Specification](https://spec.oneapi.com) and the
16-
[oneVPL Specification](https://spec.oneapi.com/versions/latest/elements/oneVPL/source/index.html) for additional information.
14+
This project is part of the larger [oneAPI](https://www.oneapi.io/) project.
15+
See the [oneAPI Specification](https://spec.oneapi.io) and the
16+
[oneVPL Specification](https://spec.oneapi.io/versions/latest/elements/oneVPL/source/index.html) for additional information.
1717

1818
The version of the oneVPL API is listed in the
1919
[mfxdefs.h](./api/vpl/mfxdefs.h) file.
@@ -23,10 +23,9 @@ The version of the oneVPL API is listed in the
2323
You can install oneVPL:
2424

2525
- from [oneVPL home page](https://software.intel.com/content/www/us/en/develop/tools/oneapi/components/onevpl.html) as a part of Intel® oneAPI Base Toolkit.
26+
- from source code. See [Installation from Sources](INSTALL.md) for details.
2627

27-
### Installation from Source
28-
See [Installation from Sources](INSTALL.md) for details.
29-
28+
For more details on installation options and procedures, see the [Intel® oneAPI Video Processing Library Installation Guide](https://software.intel.com/content/www/us/en/develop/articles/onevpl-installation-guide.html).
3029

3130
## Developer Usage
3231

@@ -52,6 +51,9 @@ Add the following code to your CMakeLists, assuming TARGET is defined as the
5251
component that wants to use oneVPL:
5352

5453
```
54+
if(WIN32 AND CMAKE_SIZEOF_VOID_P EQUAL 4)
55+
set(CMAKE_LIBRARY_ARCHITECTURE x86)
56+
endif()
5557
find_package(VPL REQUIRED)
5658
target_link_libraries(${TARGET} VPL::dispatcher)
5759
```

api/vpl/mfx.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,6 @@
2222
#include "mfxvp8.h"
2323
#include "mfxjpeg.h"
2424

25+
#include "mfxsurfacepool.h"
26+
2527
#endif /* __MFXDEFS_H__ */

api/vpl/mfxcommon.h

Lines changed: 40 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ MFX_PACK_BEGIN_USUAL_STRUCT()
163163
/*! Specifies options for threads created by this session. Attached to the
164164
mfxInitParam structure during legacy Intel(r) Media SDK session initialization. */
165165
typedef struct {
166-
mfxExtBuffer Header; /*!< Must be MFX_EXTBUFF_THREADS_PARAM. */
166+
mfxExtBuffer Header; /*!< Extension buffer header. Header.BufferId must be equal to MFX_EXTBUFF_THREADS_PARAM. */
167167

168168
mfxU16 NumThread; /*!< The number of threads. */
169169
mfxI32 SchedulingType; /*!< Scheduling policy for all threads. */
@@ -222,8 +222,10 @@ MFX_PACK_END()
222222
/* The mfxResourceType enumerator specifies types of different native data frames and buffers. */
223223
typedef enum {
224224
MFX_RESOURCE_SYSTEM_SURFACE = 1, /*!< System memory. */
225-
MFX_RESOURCE_VA_SURFACE = 2, /*!< VA surface. */
226-
MFX_RESOURCE_VA_BUFFER = 3, /*!< VA buffer. */
225+
MFX_RESOURCE_VA_SURFACE_PTR = 2, /*!< Pointer to VA surface index. */
226+
MFX_RESOURCE_VA_SURFACE = MFX_RESOURCE_VA_SURFACE_PTR, /*!< Pointer to VA surface index. */
227+
MFX_RESOURCE_VA_BUFFER_PTR = 3, /*!< Pointer to VA buffer index. */
228+
MFX_RESOURCE_VA_BUFFER = MFX_RESOURCE_VA_BUFFER_PTR, /*!< Pointer to VA buffer index. */
227229
MFX_RESOURCE_DX9_SURFACE = 4, /*!< IDirect3DSurface9. */
228230
MFX_RESOURCE_DX11_TEXTURE = 5, /*!< ID3D11Texture2D. */
229231
MFX_RESOURCE_DX12_RESOURCE = 6, /*!< ID3D12Resource. */
@@ -336,13 +338,15 @@ typedef struct {
336338
} mfxVPPDescription;
337339
MFX_PACK_END()
338340

339-
#define MFX_DEVICEDESCRIPTION_VERSION MFX_STRUCT_VERSION(1, 0)
341+
/*! The current version of mfxDeviceDescription structure. */
342+
#define MFX_DEVICEDESCRIPTION_VERSION MFX_STRUCT_VERSION(1, 1)
340343

341344
MFX_PACK_BEGIN_STRUCT_W_PTR()
342345
/*! This structure represents device description. */
343346
typedef struct {
344347
mfxStructVersion Version; /*!< Version of the structure. */
345-
mfxU16 reserved[7]; /*!< reserved for future use. */
348+
mfxU16 reserved[6]; /*!< reserved for future use. */
349+
mfxU16 MediaAdapterType; /*!< Graphics adapter type. See the mfxMediaAdapterType enumerator for a list of possible values. */
346350
mfxChar DeviceID[MFX_STRFIELD_LEN]; /*!< Null terminated string with device ID. */
347351
mfxU16 NumSubDevices; /*!< Number of available uniform sub-devices. Pure software implementation can report 0. */
348352
/*! This structure represents sub-device description. */
@@ -387,7 +391,34 @@ typedef struct {
387391
} mfxAccelerationModeDescription;
388392
MFX_PACK_END()
389393

390-
#define MFX_IMPLDESCRIPTION_VERSION MFX_STRUCT_VERSION(1, 1)
394+
/*! Specifies the surface pool allocation policies. */
395+
typedef enum {
396+
/*! Recommends to limit max pool size by sum of requested surfaces asked by components. */
397+
MFX_ALLOCATION_OPTIMAL = 0,
398+
399+
/*! Dynamic allocation with no limit. */
400+
MFX_ALLOCATION_UNLIMITED = 1,
401+
402+
/*! Max pool size is limited by NumberToPreAllocate + DeltaToAllocateOnTheFly. */
403+
MFX_ALLOCATION_LIMITED = 2,
404+
405+
} mfxPoolAllocationPolicy;
406+
407+
/*! The current version of mfxPoolPolicyDescription structure. */
408+
#define MFX_POOLPOLICYDESCRIPTION_VERSION MFX_STRUCT_VERSION(1, 0)
409+
410+
MFX_PACK_BEGIN_STRUCT_W_PTR()
411+
/*! This structure represents pool policy description. */
412+
typedef struct {
413+
mfxStructVersion Version; /*!< Version of the structure. */
414+
mfxU16 reserved[2]; /*!< reserved for future use. */
415+
mfxU16 NumPoolPolicies; /*!< Number of supported pool policies. */
416+
mfxPoolAllocationPolicy* Policy; /*!< Pointer to the array of supported pool policies. */
417+
} mfxPoolPolicyDescription;
418+
MFX_PACK_END()
419+
420+
/*! The current version of mfxImplDescription structure. */
421+
#define MFX_IMPLDESCRIPTION_VERSION MFX_STRUCT_VERSION(1, 2)
391422

392423
MFX_PACK_BEGIN_STRUCT_W_PTR()
393424
/*! This structure represents the implementation description. */
@@ -410,8 +441,9 @@ typedef struct {
410441
mfxAccelerationModeDescription AccelerationModeDescription; /*!< Supported acceleration modes. */
411442
mfxU32 reserved3[4];
412443
};
413-
mfxU32 reserved[12]; /*!< Reserved for future use. */
414-
mfxU32 NumExtParam; /*!< Number of extension buffers. Reserved for future use. Must be 0. */
444+
mfxPoolPolicyDescription PoolPolicies; /*!< Supported surface pool polices. */
445+
mfxU32 reserved[8]; /*!< Reserved for future use. */
446+
mfxU32 NumExtParam; /*!< Number of extension buffers. Reserved for future use. Must be 0. */
415447
union {
416448
mfxExtBuffer **ExtParam; /*!< Array of extension buffers. */
417449
mfxU64 Reserved2; /*!< Reserved for future use. */

api/vpl/mfxdefs.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
#define __MFXDEFS_H__
99

1010
#define MFX_VERSION_MAJOR 2
11-
#define MFX_VERSION_MINOR 4
11+
#define MFX_VERSION_MINOR 5
1212

1313
// MFX_VERSION - version of API that 'assumed' by build may be provided externally
1414
// if it omitted then latest stable API derived from Major.Minor is assumed
@@ -298,6 +298,8 @@ typedef enum
298298
/* low-delay partial output */
299299
MFX_ERR_NONE_PARTIAL_OUTPUT = 12, /*!< Frame is not ready, but bitstream contains partial output. */
300300

301+
MFX_WRN_ALLOC_TIMEOUT_EXPIRED = 13, /*!< Timeout expired for internal frame allocation. */
302+
301303
/* threading statuses */
302304
MFX_TASK_DONE = MFX_ERR_NONE, /*!< Task has been completed. */
303305
MFX_TASK_WORKING = 8, /*!< There is some more work to do. */

api/vpl/mfxdispatcher.h

Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,98 @@ mfxStatus MFX_CDECL MFXCreateSession(mfxLoader loader, mfxU32 i, mfxSession* ses
147147
*/
148148
mfxStatus MFX_CDECL MFXDispReleaseImplDescription(mfxLoader loader, mfxHDL hdl);
149149

150+
/* Helper macro definitions to add config filter properties. */
151+
152+
/*! Adds single property of mfxU32 type.
153+
@param[in] loader Valid mfxLoader object
154+
@param[in] name Property name string
155+
@param[in] value Property value
156+
*/
157+
#define MFX_ADD_PROPERTY_U32(loader, name, value) \
158+
{ \
159+
mfxVariant impl_value; \
160+
mfxConfig cfg = MFXCreateConfig(loader); \
161+
impl_value.Version.Version = MFX_VARIANT_VERSION; \
162+
impl_value.Type = MFX_VARIANT_TYPE_U32; \
163+
impl_value.Data.U32 = value; \
164+
MFXSetConfigFilterProperty(cfg, (mfxU8 *)name, impl_value); \
165+
}
166+
167+
/*! Adds single property of mfxU16 type.
168+
@param[in] loader Valid mfxLoader object
169+
@param[in] name Property name string
170+
@param[in] value Property value
171+
*/
172+
#define MFX_ADD_PROPERTY_U16(loader, name, value) \
173+
{ \
174+
mfxVariant impl_value = { 0 }; \
175+
mfxConfig cfg = MFXCreateConfig(loader); \
176+
impl_value.Version.Version = MFX_VARIANT_VERSION; \
177+
impl_value.Type = MFX_VARIANT_TYPE_U16; \
178+
impl_value.Data.U16 = value; \
179+
MFXSetConfigFilterProperty(cfg, (mfxU8 *)name, impl_value); \
180+
}
181+
182+
/*! Adds single property of pointer type.
183+
@param[in] loader Valid mfxLoader object
184+
@param[in] name Property name string
185+
@param[in] value Property value
186+
*/
187+
#define MFX_ADD_PROPERTY_PTR(loader, name, value) \
188+
{ \
189+
mfxVariant impl_value = { 0 }; \
190+
mfxConfig cfg = MFXCreateConfig(loader); \
191+
impl_value.Version.Version = MFX_VARIANT_VERSION; \
192+
impl_value.Type = MFX_VARIANT_TYPE_PTR; \
193+
impl_value.Data.Ptr = (mfxHDL)value; \
194+
MFXSetConfigFilterProperty(cfg, (mfxU8 *)name, impl_value); \
195+
}
196+
197+
/*! Update existing property of mfxU32 type.
198+
@param[in] loader Valid mfxLoader object
199+
@param[in] config Valid mfxConfig object
200+
@param[in] name Property name string
201+
@param[in] value Property value
202+
*/
203+
#define MFX_UPDATE_PROPERTY_U32(loader, config, name, value) \
204+
{ \
205+
mfxVariant impl_value; \
206+
impl_value.Version.Version = MFX_VARIANT_VERSION; \
207+
impl_value.Type = MFX_VARIANT_TYPE_U32; \
208+
impl_value.Data.U32 = value; \
209+
MFXSetConfigFilterProperty(config, (mfxU8 *)name, impl_value); \
210+
}
211+
212+
/*! Update existing property of mfxU16 type.
213+
@param[in] loader Valid mfxLoader object
214+
@param[in] config Valid mfxConfig object
215+
@param[in] name Property name string
216+
@param[in] value Property value
217+
*/
218+
#define MFX_UPDATE_PROPERTY_U16(loader, config, name, value) \
219+
{ \
220+
mfxVariant impl_value; \
221+
impl_value.Version.Version = MFX_VARIANT_VERSION; \
222+
impl_value.Type = MFX_VARIANT_TYPE_U16; \
223+
impl_value.Data.U16 = value; \
224+
MFXSetConfigFilterProperty(config, (mfxU8 *)name, impl_value); \
225+
}
226+
227+
/*! Update existing property of pointer type.
228+
@param[in] loader Valid mfxLoader object
229+
@param[in] config Valid mfxConfig object
230+
@param[in] name Property name string
231+
@param[in] value Property value
232+
*/
233+
#define MFX_UPDATE_PROPERTY_PTR(loader, config, name, value) \
234+
{ \
235+
mfxVariant impl_value; \
236+
impl_value.Version.Version = MFX_VARIANT_VERSION; \
237+
impl_value.Type = MFX_VARIANT_TYPE_PTR; \
238+
impl_value.Data.Ptr = (mfxHDL)value; \
239+
MFXSetConfigFilterProperty(config, (mfxU8 *)name, impl_value); \
240+
}
241+
150242
#ifdef __cplusplus
151243
}
152244
#endif

0 commit comments

Comments
 (0)