Skip to content

Commit dde640e

Browse files
committed
Release 2021.5.0
New in This Release ==================== * Added option to build dispatcher as a static library * Added ability to build dispatcher under MinGW * Fixes for tools and samples 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 ----------------- * 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. * dpccp-blur sample incorrectly states its usage. The sample example commandline should read: dpcpp-blur -i in.i420 -w 128 -h 96 To view: ffplay -f rawvideo -pixel_format bgra -video_size 256x192 -pixel_format yuv420p out.raw * legacy-vpp sample in hardware mode is not supported on Sky Lake. * hello-transcode readme incorrectly implies sample runs on hardware. * 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. * 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).
1 parent 0b18123 commit dde640e

File tree

405 files changed

+106730
-3090
lines changed

Some content is hidden

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

405 files changed

+106730
-3090
lines changed

.clang-format

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ ConstructorInitializerAllOnOneLineOrOnePerLine: true
5353
ConstructorInitializerIndentWidth: 8
5454
ContinuationIndentWidth: 4
5555
Cpp11BracedListStyle: false
56-
DerivePointerAlignment: true
56+
DerivePointerAlignment: false
5757
DisableFormat: false
5858
FixNamespaceComments: true
5959
ForEachMacros:
@@ -88,7 +88,7 @@ PenaltyBreakString: 1000
8888
PenaltyBreakTemplateDeclaration: 10
8989
PenaltyExcessCharacter: 1000000
9090
PenaltyReturnTypeOnItsOwnLine: 200
91-
PointerAlignment: Left
91+
PointerAlignment: Right
9292
RawStringFormats:
9393
- Language: Cpp
9494
Delimiters:

.pre-commit-config.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
fail_fast: false
88
default_language_version:
99
python: python3
10+
exclude: /ext/
1011
repos:
1112
- repo: https://github.com/pre-commit/pre-commit-hooks
1213
rev: v2.5.0

CMakeLists.txt

Lines changed: 25 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,21 @@ if(NOT CMAKE_BUILD_TYPE)
2727
endif()
2828

2929
# Project options
30+
option(BUILD_SHARED_LIBS "Build shared instead of static libraries." ON)
31+
option(BUILD_TESTS "Build tests." OFF)
32+
33+
set(BUILD_DEV
34+
ON
35+
CACHE BOOL "Build files that are only needed for development.")
3036
set(BUILD_DISPATCHER
3137
ON
3238
CACHE BOOL "Build dispatcher.")
33-
set(BUILD_DEV
39+
set(BUILD_TOOLS
3440
ON
35-
CACHE BOOL "Build files that are only needed for development.")
41+
CACHE BOOL "Build Tools.")
42+
set(BUILD_EXAMPLES
43+
ON
44+
CACHE BOOL "Build examples when building dev package.")
3645

3746
# Off by default while this is a preview
3847
set(BUILD_PYTHON_BINDING
@@ -49,6 +58,7 @@ if(BUILD_DISPATCHER_ONLY)
4958
endif()
5059
if(BUILD_DEV_ONLY)
5160
set(BUILD_DISPATCHER OFF)
61+
set(BUILD_TOOLS OFF)
5262
set(BUILD_PYTHON_BINDING OFF)
5363
endif()
5464
if(BUILD_PYTHON_BINDING_ONLY)
@@ -58,17 +68,6 @@ endif()
5868

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

61-
if(USE_ONEAPI_INSTALL_LAYOUT)
62-
set(CMAKE_INSTALL_DOCDIR "documentation")
63-
set(CMAKE_INSTALL_LIBDIR "lib")
64-
set(ONEAPI_INSTALL_ENVDIR "env")
65-
set(ONEAPI_INSTALL_SYSCHECKDIR "sys_check")
66-
set(ONEAPI_INSTALL_MODFILEDIR "modulefiles")
67-
set(ONEAPI_INSTALL_EXAMPLEDIR "examples")
68-
set(ONEAPI_INSTALL_LICENSEDIR "licensing/oneVPL")
69-
set(ONEAPI_INSTALL_PYTHONDIR "python/lib")
70-
endif()
71-
7271
# Set output directories
7372
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR})
7473
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR})
@@ -81,12 +80,19 @@ set(CMAKE_INSTALL_SO_NO_EXE 0)
8180

8281
include(cmake/CompileOptions.cmake)
8382

83+
if(BUILD_TESTS)
84+
include(Dart)
85+
enable_testing()
86+
endif()
87+
8488
add_subdirectory(api)
8589
add_subdirectory(dispatcher)
90+
if(BUILD_TOOLS)
91+
add_subdirectory(tools)
92+
endif()
8693
if(BUILD_DEV)
8794
add_subdirectory(env)
8895
add_subdirectory(modulefiles)
89-
add_subdirectory(tools)
9096
add_subdirectory(examples)
9197
endif()
9298
add_subdirectory(preview)
@@ -157,10 +163,6 @@ message(
157163
STATUS " CMAKE_INSTALL_FULL_LIBDIR : ${CMAKE_INSTALL_FULL_LIBDIR}")
158164
message(
159165
STATUS " CMAKE_INSTALL_FULL_DOCDIR : ${CMAKE_INSTALL_FULL_DOCDIR}")
160-
message(
161-
STATUS " ONEAPI_INSTALL_FULL_BIN32DIR : ${ONEAPI_INSTALL_FULL_BIN32DIR}")
162-
message(
163-
STATUS " ONEAPI_INSTALL_FULL_LIB32DIR : ${ONEAPI_INSTALL_FULL_LIB32DIR}")
164166
message(
165167
STATUS " ONEAPI_INSTALL_FULL_ENVDIR : ${ONEAPI_INSTALL_FULL_ENVDIR}")
166168
message(
@@ -177,3 +179,8 @@ message(
177179
message(STATUS "Build:")
178180
message(STATUS " BUILD_DEV : ${BUILD_DEV}")
179181
message(STATUS " BUILD_DISPATCHER : ${BUILD_DISPATCHER}")
182+
message(STATUS " BUILD_TOOLS : ${BUILD_TOOLS}")
183+
message(STATUS " BUILD_SHARED_LIBS : ${BUILD_SHARED_LIBS}")
184+
message(STATUS " BUILD_TESTS : ${BUILD_TESTS}")
185+
message(STATUS " BUILD_EXAMPLES : ${BUILD_EXAMPLES}")
186+
message(STATUS " BUILD_PYTHON_BINDING : ${BUILD_PYTHON_BINDING}")

api/vpl/preview/defs.hpp

Lines changed: 0 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -210,44 +210,6 @@ enum class frame_type : uint16_t {
210210

211211
ENABLE_BIT_OPERATORS_WITH_ENUM(frame_type);
212212

213-
static status mfxstatus_to_onevplstatus(mfxStatus s) {
214-
switch (s) {
215-
case MFX_ERR_NONE:
216-
return status::Ok;
217-
case MFX_WRN_IN_EXECUTION:
218-
return status::ExecutionInProgress;
219-
case MFX_WRN_DEVICE_BUSY:
220-
return status::DeviceBusy;
221-
case MFX_WRN_VIDEO_PARAM_CHANGED:
222-
return status::VideoParamChanged;
223-
case MFX_WRN_PARTIAL_ACCELERATION:
224-
return status::PartialAcceleration;
225-
case MFX_WRN_INCOMPATIBLE_VIDEO_PARAM:
226-
return status::IncompartibleVideoParam;
227-
case MFX_WRN_VALUE_NOT_CHANGED:
228-
return status::ValueNotChanged;
229-
case MFX_WRN_OUT_OF_RANGE:
230-
return status::OutOfRange;
231-
case MFX_TASK_WORKING:
232-
return status::TaskWorking;
233-
case MFX_TASK_BUSY:
234-
return status::TaskBusy;
235-
case MFX_WRN_FILTER_SKIPPED:
236-
return status::FilterSkipped;
237-
case MFX_ERR_NONE_PARTIAL_OUTPUT:
238-
return status::PartialOutput;
239-
//// Errors but they need to be treat as positive status in some cases.
240-
case MFX_ERR_NOT_ENOUGH_BUFFER:
241-
return status::NotEnoughBuffer;
242-
case MFX_ERR_MORE_DATA:
243-
return status::NotEnoughData;
244-
case MFX_ERR_MORE_SURFACE:
245-
return status::NotEnoughSurface;
246-
default:
247-
return status::Unknown;
248-
}
249-
}
250-
251213
enum class implementation : uint32_t {
252214
automatic = MFX_IMPL_AUTO,
253215
unsupported = MFX_IMPL_UNSUPPORTED,

api/vpl/preview/extension_buffer.hpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -346,8 +346,8 @@ REGISTER_TRIVIAL_EXT_BUFFER(ExtPartialBitstreamParam,
346346
\
347347
/*! @brief Dtor. */ \
348348
~className() { \
349-
delete[] buffer_.ptr; \
350349
buffer_.numElems = 0; \
350+
delete[] buffer_.ptr; \
351351
} \
352352
/*! @brief Copy operator. */ \
353353
/*! @param[in] other another object to use as data source. */ \
@@ -358,7 +358,7 @@ REGISTER_TRIVIAL_EXT_BUFFER(ExtPartialBitstreamParam,
358358
\
359359
if (this->buffer_.ptr) \
360360
delete[] this->buffer_.ptr; \
361-
this->buffer_ = other.buffer_; \
361+
this->buffer_.ptr = NULL; \
362362
\
363363
if (other.buffer_.numElems) { \
364364
this->buffer_.numElems = other.buffer_.numElems; \
@@ -369,7 +369,6 @@ REGISTER_TRIVIAL_EXT_BUFFER(ExtPartialBitstreamParam,
369369
} \
370370
else { \
371371
buffer_.numElems = 0; \
372-
buffer_.ptr = NULL; \
373372
} \
374373
\
375374
return *this; \

api/vpl/preview/extension_buffer_list.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@ static constexpr uint32_t ignore_ID_list[IGNORE_LIST_LEN] = { 0, MFX_EXTBUFF_VPP
2424
class buffer_list {
2525
public:
2626
/// @brief default ctor
27-
buffer_list() : mfxBuffers_(0), extBuffers_() {}
27+
buffer_list() : extBuffers_() , mfxBuffers_(0) {}
2828

29-
buffer_list(const buffer_list& other) : mfxBuffers_(0), extBuffers_(other.extBuffers_){}
29+
buffer_list(const buffer_list& other) : extBuffers_(other.extBuffers_), mfxBuffers_(0){}
3030
buffer_list& operator=(const buffer_list& other){
3131
if(mfxBuffers_ != other.mfxBuffers_){
3232
if(mfxBuffers_){

api/vpl/preview/frame_surface.hpp

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,18 @@ class frame_surface : public std::enable_shared_from_this<frame_surface> {
194194
return std::pair(frame_info(surface_->Info), frame_data(surface_->Data));
195195
}
196196

197+
/// @brief Maps data to the system memory.
198+
/// @param flags Data access flag: read or write.
199+
/// @return Pointers to the surface data strucuture in the system memory
200+
auto map_data(memory_access flags) {
201+
wait();
202+
detail::c_api_invoker(detail::default_checker,
203+
surface_->FrameInterface->Map,
204+
surface_,
205+
(mfxMemoryFlags)flags);
206+
return frame_data(surface_->Data);
207+
}
208+
197209
/// @brief Unmaps data to the system memory.
198210
void unmap() {
199211
detail::c_api_invoker(detail::default_checker, surface_->FrameInterface->Unmap, surface_);

api/vpl/preview/options.hpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,18 +31,18 @@ class property {
3131
/// @param[in] name Name of the property
3232
/// @param[in] value Value
3333
template <typename T>
34-
property(property_name &name, T value) : value_(value),
35-
name_(name.get_name()) {}
34+
property(property_name &name, T value) : name_(name.get_name()),
35+
value_(value) {}
3636
/// @brief Constucts property with given name and the value
3737
/// @tparam T Type of the value
3838
/// @param[in] name Name of the property
3939
/// @param[in] value Value
4040
template <typename T>
41-
property(std::string &name, T value) : value_(value),
42-
name_(name) {}
41+
property(std::string &name, T value) : name_(name),
42+
value_(value) {}
4343
/// @brief Copy ctor
4444
/// @param[in] other another object to use as data source
45-
property(const property &other) : value_(other.value_), name_(other.name_) {}
45+
property(const property &other) : name_(other.name_), value_(other.value_) {}
4646
/// @brief Dtor
4747
virtual ~property() {}
4848

api/vpl/preview/payload.hpp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,8 @@ class payload {
6161

6262
/// @brief Copy ctor.
6363
/// @param[in] other Object to copy.
64-
payload(const payload& other) {
64+
payload(const payload& other) :
65+
codec_id_(other.codec_id_) {
6566
ctor_helper(other.get_payload_data(),
6667
other.payload_.NumBit,
6768
other.payload_.Type,
@@ -76,6 +77,7 @@ class payload {
7677
payload_.NumBit = other.payload_.NumBit;
7778
payload_.BufSize = other.payload_.BufSize;
7879
payload_.Data = other.payload_.Data;
80+
codec_id_ = other.codec_id_;
7981

8082
other.payload_.Data = 0;
8183
}
@@ -94,6 +96,7 @@ class payload {
9496
other.payload_.NumBit,
9597
other.payload_.Type,
9698
other.payload_.CtrlFlags);
99+
codec_id_ = other.codec_id_;
97100
return *this;
98101
}
99102

@@ -112,7 +115,7 @@ class payload {
112115
payload_.NumBit = other.payload_.NumBit;
113116
payload_.BufSize = other.payload_.BufSize;
114117
payload_.Data = other.payload_.Data;
115-
118+
codec_id_ = other.codec_id_;
116119
other.payload_.Data = 0;
117120
return *this;
118121
}

api/vpl/preview/property_name.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,7 @@ class property_name {
288288
/// @brief Add item
289289
/// @param subname Subname
290290
constexpr void add_item(std::string_view subname) {
291-
int i = 0;
291+
unsigned int i = 0;
292292
ID_ = check_value(subname, level_, ID_);
293293

294294
for (i = 0; i < subname.size(); i++) {

0 commit comments

Comments
 (0)