Skip to content
This repository was archived by the owner on May 17, 2023. It is now read-only.

Commit 1ec49c7

Browse files
author
Maslennikov, Andrey
committed
Initial commit
0 parents  commit 1ec49c7

File tree

873 files changed

+359843
-0
lines changed

Some content is hidden

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

873 files changed

+359843
-0
lines changed

.gitattributes

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
*.pdf filter=lfs diff=lfs merge=lfs -text
2+
*.yuv filter=lfs diff=lfs merge=lfs -text
3+
*.ivf filter=lfs diff=lfs merge=lfs -text
4+
*.jpg filter=lfs diff=lfs merge=lfs -text
5+
*.mpeg2 filter=lfs diff=lfs merge=lfs -text
6+
*.264 filter=lfs diff=lfs merge=lfs -text
7+
*.265 filter=lfs diff=lfs merge=lfs -text

.gitignore

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# build folder
2+
__cmake/
3+
tests/gold/
4+
tests/results/
5+
tests/ted/__pycache__/
6+
tests/test_results.json

CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Intel® Media SDK first open source release!
2+
**Known limitations**:
3+
- Copy from video to system memory with `mfxInitParam::GPUCopy = MFX_GPUCOPY_OFF` leads to performance degradation up to x10 comparing to Intel® Media Server Studio release
4+
- Intel® Media Server Studio [limitations](https://software.intel.com/en-us/articles/intel-media-server-studio-release-notes)

CMakeLists.txt

+59
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
# Copyright (c) 2017 Intel Corporation
2+
#
3+
# Permission is hereby granted, free of charge, to any person obtaining a copy
4+
# of this software and associated documentation files (the "Software"), to deal
5+
# in the Software without restriction, including without limitation the rights
6+
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7+
# copies of the Software, and to permit persons to whom the Software is
8+
# furnished to do so, subject to the following conditions:
9+
#
10+
# The above copyright notice and this permission notice shall be included in all
11+
# copies or substantial portions of the Software.
12+
#
13+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15+
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16+
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17+
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18+
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
19+
# SOFTWARE.
20+
21+
cmake_minimum_required( VERSION 2.6.2 )
22+
project( mediasdk )
23+
24+
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
25+
26+
set( BUILDER_ROOT "${CMAKE_HOME_DIRECTORY}/lib/builder" )
27+
28+
if( NOT DEFINED CMAKE_MFX_HOME )
29+
set( CMAKE_MFX_HOME "${CMAKE_HOME_DIRECTORY}/api" )
30+
endif()
31+
32+
option( ENABLE_OPENCL "Build targets dependent on OpenCL?" ON )
33+
if( ${CMAKE_SYSTEM_NAME} MATCHES Linux )
34+
option( ENABLE_DRM "Build DRM versions of the targets?" ON )
35+
option( ENABLE_X11 "Build X11 versions of the targets?" ON )
36+
option( ENABLE_X11_DRI3 "Build X11 DRI3 versions of the targets?" OFF )
37+
option( ENABLE_WAYLAND "Build WAYLAND versions of the targets?" OFF )
38+
endif()
39+
40+
include( ${BUILDER_ROOT}/FindOpenCL.cmake )
41+
include( ${BUILDER_ROOT}/FindFunctions.cmake )
42+
include( ${BUILDER_ROOT}/FindGlobals.cmake )
43+
include( ${BUILDER_ROOT}/FindMFX.cmake )
44+
include( ${BUILDER_ROOT}/FindPackages.cmake )
45+
include( ${BUILDER_ROOT}/FindInternals.cmake )
46+
include( ${BUILDER_ROOT}/FindTrace.cmake )
47+
48+
if( EXISTS "${BUILDER_ROOT}/ConfTargets.cmake" )
49+
include( ${BUILDER_ROOT}/ConfTargets.cmake )
50+
else()
51+
message( STATUS "There is no ConfTargets.cmake" )
52+
endif()
53+
54+
foreach( dir api contrib lib/_studio samples )
55+
set( CMAKE_SOURCE_DIR "${CMAKE_HOME_DIRECTORY}/${dir}" )
56+
create_build()
57+
endforeach()
58+
59+
create_plugins_cfg(${CMAKE_BINARY_DIR})

CONTRIBUTING.md

+61
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
We welcome community contributions to Intel® Media SDK. Thank you for your time!
2+
3+
Please note that review and merge might take some time at this point.
4+
5+
Intel Media SDK is licensed under MIT license. By contributing to the project, you agree to the license and copyright terms therein and release your contribution under these terms.
6+
7+
Steps:
8+
- Validate that your changes don't break a build. See [build instruction](./README.md#how-to-build)
9+
- Pass [testing](#testing)
10+
- Wait while your patchset is reviewed and tested by our internal validation cycle
11+
12+
# Testing
13+
14+
## Requirements
15+
16+
Python* 3.5 is required to run tests. The following instruction assumes that Intel Media SDK cloned to `~/msdk` folder.
17+
18+
## How to test your changes
19+
20+
### 1. Rename system-wide Intel Media SDK libraries:
21+
22+
```sh
23+
cd /opt/intel/mediasdk/lib64
24+
# rename all libmfx*, for example:
25+
sudo mv libmfxhw64.so libmfxhw64.so.default
26+
27+
cd /opt/intel/mediasdk/plugins/
28+
# rename all plugins, for example:
29+
sudo mv libmfx_hevcd_hw64.so libmfx_hevcd_hw64.so.default
30+
sudo mv libmfx_h264la_hw64.so libmfx_h264la_hw64.so.default
31+
sudo mv libmfx_hevce_hw64.so libmfx_hevce_hw64.so.default
32+
sudo mv libmfx_vp8d_hw64.so libmfx_vp8d_hw64.so.default
33+
```
34+
35+
### 2. Build original version of open-source Intel Media SDK and samples
36+
37+
```sh
38+
cd ~/msdk
39+
export MFX_HOME=`pwd`
40+
perl tools/builder/build_mfx.pl --cmake=intel64.make.release
41+
make -j8 -C __cmake/intel64.make.release
42+
```
43+
44+
### 3. Collect gold results
45+
46+
```sh
47+
cd ~/msdk/tests
48+
python3.5 ted.py --gold
49+
```
50+
51+
### 4. Apply changes to Intel Media SDK, commit them, and rebuild library and samples
52+
53+
### 5. Run tests once again to compare with gold results
54+
55+
```sh
56+
python3.5 ted.py
57+
```
58+
59+
All tests should pass. If not, you need to provide an explanation of why streams generated using the modified library are not bit-exact with the original ones.
60+
61+
### 6. Attach generated test_results.json to your pull request.

LICENSE

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
Copyright (c) 2017 Intel Corporation
2+
3+
Permission is hereby granted, free of charge, to any person obtaining a copy
4+
of this software and associated documentation files (the "Software"), to deal
5+
in the Software without restriction, including without limitation the rights
6+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7+
copies of the Software, and to permit persons to whom the Software is
8+
furnished to do so, subject to the following conditions:
9+
10+
The above copyright notice and this permission notice shall be included in all
11+
copies or substantial portions of the Software.
12+
13+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
19+
SOFTWARE.

README.md

+88
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
# Intel® Media SDK
2+
Intel® Media SDK provides an API to access hardware-accelerated video decode, encode and filtering on Intel® platforms with integrated graphics.
3+
4+
**Supported video encoders**: HEVC, AVC, MPEG-2, JPEG
5+
**Supported Video decoders**: HEVC, AVC, VP8, MPEG-2, VC1, JPEG
6+
**Supported video pre-processing filters**: Color Conversion, Deinterlace, Denoise, Resize, Rotate
7+
8+
# Important note
9+
The current version of Intel Media SDK is only compatible with the Linux* Graphics Driver from [Intel Media Server Studio for Linux*](https://software.intel.com/en-us/intel-media-server-studio). You need to download and install Intel Media Server Studio 2017 R2 _before_ you build Intel Media SDK.
10+
Intel Media SDK depends on a special version of [LibVA](https://www.freedesktop.org/wiki/Software/vaapi/) which comes with Intel Media Server Studio installation and is not in upstream, so this version is not compatible with the LibVA/driver available at [01org](https://01.org/linuxgraphics/downloads ).
11+
12+
# FAQ
13+
You can find answers for the most frequently asked questions [here](https://software.intel.com/sites/default/files/managed/c0/8e/intel-media-sdk-open-source-faq.pdf).
14+
15+
# Table of contents
16+
17+
* [License](#license)
18+
* [How to contribute](#how-to-contribute)
19+
* [System requirements](#system-requirements)
20+
* [How to build](#how-to-build)
21+
* [Requirements](#requirements)
22+
* [Build steps](#build-steps)
23+
* [Enabling Instrumentation and Tracing Technology](#enabling-instrumentation-and-tracing-technology)
24+
* [See also](#see-also)
25+
26+
# License
27+
Intel Media SDK is licensed under MIT license. See [LICENSE](./LICENSE) for details.
28+
29+
# How to contribute
30+
See [CONTRIBUTING](./CONTRIBUTING.md) for details. Thank you!
31+
32+
# System requirements
33+
**Operating System:** CentOS 7.2 is the recommended and the only tested platform.
34+
**Hardware:**
35+
Intel platforms with integrated graphics:
36+
- Intel® Xeon® E3-1200 v4 family with C226 chipset
37+
- Intel Xeon E3-1200 and E3-1500 v5 families with C236 chipset
38+
- 5th Generation Intel® Core™ processors
39+
- 6th Generation Intel Core processors
40+
41+
Please find documentation under the `doc/` folder or navigate to [Intel Media Server Studio support page](https://software.intel.com/en-us/intel-media-server-studio-support/documentation).
42+
43+
# How to build
44+
## Requirements
45+
- Git* (with [LFS](https://git-lfs.github.com/) support)
46+
- Perl* v5.16+
47+
- Cmake* v2.8+
48+
- GCC* v4.8+
49+
- Intel Media Server Studio
50+
51+
## Build steps
52+
53+
Get sources
54+
```sh
55+
git clone https://github.com/Intel-Media-SDK/MediaSDK msdk
56+
cd msdk
57+
```
58+
59+
Set up environment variables:
60+
```sh
61+
export MFX_HOME=`pwd`
62+
```
63+
64+
Configure build with GCC (default) compiler:
65+
```sh
66+
perl tools/builder/build_mfx.pl --cmake=intel64.make.release
67+
```
68+
This will build MSDK binaries and MSDK samples.
69+
70+
If you want to configure build with CLang compiler use the following command:
71+
```sh
72+
perl tools/builder/build_mfx.pl --cmake=intel64.make.release.clang
73+
```
74+
75+
Run build:
76+
```sh
77+
make -j8 -C __cmake/intel64.make.release
78+
```
79+
80+
## Enabling Instrumentation and Tracing Technology
81+
To enable the Instrumentation and Tracing Technology API you need either Interl® Vtune Amplifier installed or to manually build an open source version. You can get ITT source files from [GitHub](https://github.com/01org/IntelSEAPI/tree/master/ittnotify) and build it on your own.
82+
83+
**Please note** that auto detection of the Intel Vtune Amplifier configuration is not supported. The next step is mandatory if you want to use this feature: set `$ITT_PATH` so `$ITT_PATH/include/ittnotify.h` and `$ITT_PATH/libittnotify64.a` will be valid paths. MSDK build system will automatically detect it.
84+
85+
# See also
86+
Intel Media Server Studio: https://software.intel.com/en-us/intel-media-server-studio
87+
88+
Intel Media SDK: https://software.intel.com/en-us/media-sdk

0 commit comments

Comments
 (0)