Skip to content

Commit

Permalink
Release 2020.1 Gold
Browse files Browse the repository at this point in the history
  • Loading branch information
akwrobel committed Dec 8, 2020
1 parent 9dc172f commit 77054c3
Show file tree
Hide file tree
Showing 101 changed files with 4,952 additions and 24,167 deletions.
3 changes: 1 addition & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,10 @@ add_subdirectory(dispatcher)
add_subdirectory(env)
add_subdirectory(modulefiles)
add_subdirectory(tools/cli)
add_subdirectory(tools/legacy)
add_subdirectory(examples/hello-decode)
add_subdirectory(examples/hello-encode)
add_subdirectory(examples/hello-vpp)
add_subdirectory(examples/dpcpp-blur)
add_subdirectory(examples/hello-transcode)

install(
FILES third-party-programs.txt
Expand Down
96 changes: 74 additions & 22 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,25 +1,26 @@
# Contributing guidelines
# Contributing

## Pull request checklist
The oneVPL project welcomes community contributions. You can:

Before submitting your pull requests, make sure you followed this list.
- Submit your changes directly as a [pull request](https://github.com/oneapi-src/oneVPL/pulls)
- Log a bug or feature request with an [issue](https://github.com/oneapi-src/oneVPL/issues)

- Read [contributing guidelines](CONTRIBUTING.md).
## Pull Request Checklist

- Check if changes are consistent with the
[guidelines](#general-guidelines-and-philosophy-for-contribution).
Before submitting your pull requests, please do the following:

- Check if changes are consistent with the
[coding style](#commit-message-style).
- Make sure your changes are consistent with the
[philosophy for contribution](#philosophy-for-contribution).

- Make sure the correct license is included at the top of new files.

## How to become a contributor and submit your own code
- Make sure your commits follow the correct
[commit message style](#commit-message-style).

### Contribution guidelines and standards
- Make sure to [sign your work](#sign-your-work).

Before submitting your pull request for review, make sure your changes are consistent with project guidelines and coding style.

#### General guidelines and philosophy for contribution
## Philosophy for Contribution

Contributed code must be:

Expand All @@ -34,12 +35,7 @@ Contributed code must be:
- *Portable*: The project supports different operating systems CPU and GPU
architectures, compilers, and run-times.


#### License

Include a license at the top of new files.

#### Commit message style
## Commit Message Style

1. Separate subject from body with a blank line
2. Limit the subject line to 50 characters
Expand All @@ -52,19 +48,75 @@ Include a license at the top of new files.
Further reading:
[How to Write a Git Commit Message](https://chris.beams.io/posts/git-commit/)

#### Automated style checking
## Sign Your Work

Please use the sign-off line at the end of the patch. Your signature certifies
that you wrote the patch or otherwise have the right to pass it on as an
open-source patch. The rules are pretty simple: if you can certify
the below (from [developercertificate.org](http://developercertificate.org/)):

```
Developer Certificate of Origin
Version 1.1
Copyright (C) 2004, 2006 The Linux Foundation and its contributors.
660 York Street, Suite 102,
San Francisco, CA 94110 USA
Everyone is permitted to copy and distribute verbatim copies of this
license document, but changing it is not allowed.
Developer's Certificate of Origin 1.1
By making a contribution to this project, I certify that:
(a) The contribution was created in whole or in part by me and I
have the right to submit it under the open source license
indicated in the file; or
(b) The contribution is based upon previous work that, to the best
of my knowledge, is covered under an appropriate open source
license and I have the right under that license to submit that
work with modifications, whether created in whole or in part
by me, under the same open source license (unless I am
permitted to submit under a different license), as indicated
in the file; or
(c) The contribution was provided directly to me by some other
person who certified (a), (b) or (c) and I have not modified
it.
(d) I understand and agree that this project and the contribution
are public and that a record of the contribution (including all
personal information I submit with it, including my sign-off) is
maintained indefinitely and may be redistributed consistent with
this project or the open source license(s) involved.
```

Then you just add a line to every git commit message:

Signed-off-by: Kris Smith <[email protected]>

Use your real name (sorry, no pseudonyms or anonymous contributions.)

If you set your `user.name` and `user.email` git configs, you can sign your
commit automatically with `git commit -s`.

## Automated Style Checking

Install the Python modules required by the script\lint format checking script:

```
pip3 install -r requirements-dev.txt
```

Install Version 11.0.0 of `clang-format` by clicking on a link below to download. The file is named after the sha1 hash, rename it to clang-format.exe. Add its path to the PATH environment variable.
Install version 11.0.0 of `clang-format` using one of the links listed below.
The file is named after the sha1 hash, rename it to clang-format.exe. Add it's
path to the PATH environment variable.

[Windows binary](https://commondatastorage.googleapis.com/chromium-clang-format/d4afd4eba27022f5f6d518133aebde57281677c9)
- [Windows binary](https://commondatastorage.googleapis.com/chromium-clang-format/d4afd4eba27022f5f6d518133aebde57281677c9)
(sha1: d4afd4eba27022f5f6d518133aebde57281677c9)

[Linux binary](https://commondatastorage.googleapis.com/chromium-clang-format/1baf0089e895c989a311b6a38ed94d0e8be4c0a7)
- [Linux binary](https://commondatastorage.googleapis.com/chromium-clang-format/1baf0089e895c989a311b6a38ed94d0e8be4c0a7)
(sha1: 1baf0089e895c989a311b6a38ed94d0e8be4c0a7)

41 changes: 19 additions & 22 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,28 +12,22 @@ This repository contains the following components of oneVPL:
- oneVPL command line tools

This project is part of the larger [oneAPI](https://www.oneapi.com/) project.
See **Contributing** below for details about submitting issues and pull
requests.
See the [oneAPI Specification](https://spec.oneapi.com) and the
[oneVPL Specification](https://spec.oneapi.com/versions/latest/elements/oneVPL/source/index.html) for additional information.

oneAPI Specification:
https://spec.oneapi.com
The version of the oneVPL API is listed in the
[mfxdefs.h](./api/vpl/mfxdefs.h) file.

oneVPL Specification:
https://spec.oneapi.com/versions/latest/elements/oneVPL/source/index.html
## Prerequisites

The version of the oneVPL API is listed in the file
[mfxdefs.h](./api/vpl/mfxdefs.h).
To build this project you will need:


## Building and Installing

### Prerequisites

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

## Build and Installation

### General
Build the project with the following commands:

```
mkdir _build
Expand All @@ -45,21 +39,24 @@ cmake --build . --config Release --target install

You can find the build output in `<vpl-install-location>`.


## Getting an Implementation

To use oneVPL for video processing to you need to install at least one
implementation:
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) - CPU reference
- [oneVPL-cpu](https://github.com/oneapi-src/oneVPL-cpu), the CPU reference
implementation


## Contributing

Please see the [CONTRIBUTING.md](CONTRIBUTING.md) file for details.
See [CONTRIBUTING.md](CONTRIBUTING.md) for more information.

## License

This project is licensed under the MIT License - see the [LICENSE](LICENSE) file
This project is licensed under the MIT License. See the [LICENSE](LICENSE) file
for details.

## Security

See the [Intel Security Center](https://www.intel.com/content/www/us/en/security-center/default.html) for information on how to report a potential
security issue or vulnerability.
8 changes: 0 additions & 8 deletions api/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,3 @@ install(
DIRECTORY vpl
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
COMPONENT dev)

set(DEST_DIR "${CMAKE_INSTALL_PREFIX}")
configure_file("libmfx.pc.in" "libmfx.pc" @ONLY)

install(
FILES ${CMAKE_CURRENT_BINARY_DIR}/libmfx.pc
DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig
COMPONENT dev)
18 changes: 17 additions & 1 deletion cmake/CompileOptions.cmake
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# ##############################################################################
# Copyright (C) 2020 Intel Corporation
# Copyright (C) Intel Corporation
#
# SPDX-License-Identifier: MIT
# ##############################################################################
Expand All @@ -10,3 +10,19 @@
if(CMAKE_BUILD_TYPE STREQUAL "Debug")
add_definitions(-D_DEBUG)
endif()

if(MSVC)
add_link_options("/DYNAMICBASE")
add_link_options("/HIGHENTROPYVA")
add_link_options("/LARGEADDRESSAWARE")
add_link_options("/NXCOMPAT")
add_compile_options("/GS")
else()
add_compile_options("-Wformat")
add_compile_options("-Wformat-security")
add_compile_options("-Werror=format-security")
add_definitions("-D_FORTIFY_SOURCE=2")
add_compile_options("-fstack-protector-strong")
set(CMAKE_CXX_FLAGS "-z relro -z now -z noexecstack")
add_compile_options("-Wall")
endif()
2 changes: 2 additions & 0 deletions dispatcher/vpl/mfx_dispatcher_vpl.h
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,8 @@ class ConfigCtxVPL {

private:
__inline std::string GetNextProp(std::list<std::string>* s) {
if (s->empty())
return "";
std::string t = s->front();
s->pop_front();
return t;
Expand Down
3 changes: 3 additions & 0 deletions dispatcher/vpl/mfx_dispatcher_vpl_config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -652,6 +652,9 @@ mfxStatus ConfigCtxVPL::ValidateConfig(mfxImplDescription *libImplDesc,
bool encRequested = false;
bool vppRequested = false;

if (!libImplDesc)
return MFX_ERR_NULL_PTR;

std::list<DecConfig> decConfigList;
std::list<EncConfig> encConfigList;
std::list<VPPConfig> vppConfigList;
Expand Down
29 changes: 19 additions & 10 deletions dispatcher/vpl/mfx_dispatcher_vpl_loader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,7 @@ mfxStatus LoaderCtxVPL::SearchDirForLibs(STRING_TYPE searchDir,
libInfoList.push_back(libInfo);
}
}
closedir(pSearchDir);
}
#endif

Expand Down Expand Up @@ -294,6 +295,24 @@ mfxU32 LoaderCtxVPL::CheckValidLibraries() {
// iterate over all implementation runtimes
// unload DLL's and free memory
mfxStatus LoaderCtxVPL::UnloadAllLibraries() {
std::list<ImplInfo*>::iterator it2 = m_implInfoList.begin();
while (it2 != m_implInfoList.end()) {
ImplInfo* implInfo = (*it2);

if (implInfo) {
// call MFXReleaseImplDescription() for this implementation if it
// was never called by application
if (implInfo->implDesc) {
LibInfo* libInfo = implInfo->libInfo;
VPLFunctionPtr pFunc = libInfo->vplFuncTable[IdxMFXReleaseImplDescription];
(*(mfxStatus(MFX_CDECL*)(mfxHDL))pFunc)(implInfo->implDesc);
}

delete implInfo;
}
it2++;
}

std::list<LibInfo*>::iterator it = m_libInfoList.begin();
while (it != m_libInfoList.end()) {
LibInfo* libInfo = (*it);
Expand All @@ -309,16 +328,6 @@ mfxStatus LoaderCtxVPL::UnloadAllLibraries() {
it++;
}

std::list<ImplInfo*>::iterator it2 = m_implInfoList.begin();
while (it2 != m_implInfoList.end()) {
ImplInfo* implInfo = (*it2);

if (implInfo) {
delete implInfo;
}
it2++;
}

return MFX_ERR_NONE;
}

Expand Down
41 changes: 41 additions & 0 deletions docker/Dockerfile-ubuntu-19.10
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# ==============================================================================
# Copyright (C) 2020 Intel Corporation
#
# SPDX-License-Identifier: MIT
# ==============================================================================

ARG VPL_INSTALL_PREFIX=/opt/intel/onevpl

# Stage 1
FROM ubuntu:19.10 AS vpl_base
ARG DEBIAN_FRONTEND=noninteractive
ENV TZ=Europe/Moscow
RUN apt-get update && apt-get install -y --no-install-recommends \
build-essential \
git \
pkg-config \
cmake && \
rm -rf /var/lib/apt/lists/*


# Stage 2
FROM vpl_base AS vpl_build
ARG VPL_INSTALL_PREFIX
COPY . /oneVPL
RUN cd /oneVPL && \
mkdir _build && \
cd _build && \
cmake -DCMAKE_INSTALL_PREFIX=${VPL_INSTALL_PREFIX} .. && \
make -j $(nproc --all) && \
make install


# Runtime image build
FROM ubuntu:19.10
LABEL Description="This is the Ubuntu 19.10 base image for the oneAPI Video Processing Library API"
LABEL Vendor="Intel Corporation"
ARG VPL_INSTALL_PREFIX
ENV LD_LIBRARY_PATH=${VPL_INSTALL_PREFIX}/lib
ENV PKG_CONFIG_PATH=${VPL_INSTALL_PREFIX}/pkgconfig
ENV PATH="${PATH}:/${VPL_INSTALL_PREFIX}/bin"
COPY --from=vpl_build ${VPL_INSTALL_PREFIX} ${VPL_INSTALL_PREFIX}
11 changes: 6 additions & 5 deletions docker/build_docker_images.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@

set -e
BASEDIR=$(dirname "$0")
docker build -f ${BASEDIR}/Dockerfile-rhel-8 -t vpl-rhel:8 ${BASEDIR}/..
docker build -f ${BASEDIR}/Dockerfile-centos-7 -t vpl-centos:7 ${BASEDIR}/..
docker build -f ${BASEDIR}/Dockerfile-centos-8 -t vpl-centos:8 ${BASEDIR}/..
docker build -f ${BASEDIR}/Dockerfile-ubuntu-18.04 -t vpl-ubuntu:18.04 ${BASEDIR}/..
docker build -f ${BASEDIR}/Dockerfile-ubuntu-20.04 -t vpl-ubuntu:20.04 ${BASEDIR}/..
docker build -f ${BASEDIR}/Dockerfile-rhel-8 -t vpl:rhel8 ${BASEDIR}/..
docker build -f ${BASEDIR}/Dockerfile-centos-7 -t vpl:centos7 ${BASEDIR}/..
docker build -f ${BASEDIR}/Dockerfile-centos-8 -t vpl:centos8 ${BASEDIR}/..
docker build -f ${BASEDIR}/Dockerfile-ubuntu-18.04 -t vpl:ubuntu18.04 ${BASEDIR}/..
docker build -f ${BASEDIR}/Dockerfile-ubuntu-19.10 -t vpl:ubuntu19.10 ${BASEDIR}/..
docker build -f ${BASEDIR}/Dockerfile-ubuntu-20.04 -t vpl:ubuntu20.04 ${BASEDIR}/..
Loading

0 comments on commit 77054c3

Please sign in to comment.