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

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Maslennikov, Andrey committed Apr 4, 2017
0 parents commit 1ec49c7
Show file tree
Hide file tree
Showing 873 changed files with 359,843 additions and 0 deletions.
7 changes: 7 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
*.pdf filter=lfs diff=lfs merge=lfs -text
*.yuv filter=lfs diff=lfs merge=lfs -text
*.ivf filter=lfs diff=lfs merge=lfs -text
*.jpg filter=lfs diff=lfs merge=lfs -text
*.mpeg2 filter=lfs diff=lfs merge=lfs -text
*.264 filter=lfs diff=lfs merge=lfs -text
*.265 filter=lfs diff=lfs merge=lfs -text
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# build folder
__cmake/
tests/gold/
tests/results/
tests/ted/__pycache__/
tests/test_results.json
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Intel® Media SDK first open source release!
**Known limitations**:
- 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
- Intel® Media Server Studio [limitations](https://software.intel.com/en-us/articles/intel-media-server-studio-release-notes)
59 changes: 59 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
# Copyright (c) 2017 Intel Corporation
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all
# copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.

cmake_minimum_required( VERSION 2.6.2 )
project( mediasdk )

set(CMAKE_EXPORT_COMPILE_COMMANDS ON)

set( BUILDER_ROOT "${CMAKE_HOME_DIRECTORY}/lib/builder" )

if( NOT DEFINED CMAKE_MFX_HOME )
set( CMAKE_MFX_HOME "${CMAKE_HOME_DIRECTORY}/api" )
endif()

option( ENABLE_OPENCL "Build targets dependent on OpenCL?" ON )
if( ${CMAKE_SYSTEM_NAME} MATCHES Linux )
option( ENABLE_DRM "Build DRM versions of the targets?" ON )
option( ENABLE_X11 "Build X11 versions of the targets?" ON )
option( ENABLE_X11_DRI3 "Build X11 DRI3 versions of the targets?" OFF )
option( ENABLE_WAYLAND "Build WAYLAND versions of the targets?" OFF )
endif()

include( ${BUILDER_ROOT}/FindOpenCL.cmake )
include( ${BUILDER_ROOT}/FindFunctions.cmake )
include( ${BUILDER_ROOT}/FindGlobals.cmake )
include( ${BUILDER_ROOT}/FindMFX.cmake )
include( ${BUILDER_ROOT}/FindPackages.cmake )
include( ${BUILDER_ROOT}/FindInternals.cmake )
include( ${BUILDER_ROOT}/FindTrace.cmake )

if( EXISTS "${BUILDER_ROOT}/ConfTargets.cmake" )
include( ${BUILDER_ROOT}/ConfTargets.cmake )
else()
message( STATUS "There is no ConfTargets.cmake" )
endif()

foreach( dir api contrib lib/_studio samples )
set( CMAKE_SOURCE_DIR "${CMAKE_HOME_DIRECTORY}/${dir}" )
create_build()
endforeach()

create_plugins_cfg(${CMAKE_BINARY_DIR})
61 changes: 61 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
We welcome community contributions to Intel® Media SDK. Thank you for your time!

Please note that review and merge might take some time at this point.

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.

Steps:
- Validate that your changes don't break a build. See [build instruction](./README.md#how-to-build)
- Pass [testing](#testing)
- Wait while your patchset is reviewed and tested by our internal validation cycle

# Testing

## Requirements

Python* 3.5 is required to run tests. The following instruction assumes that Intel Media SDK cloned to `~/msdk` folder.

## How to test your changes

### 1. Rename system-wide Intel Media SDK libraries:

```sh
cd /opt/intel/mediasdk/lib64
# rename all libmfx*, for example:
sudo mv libmfxhw64.so libmfxhw64.so.default

cd /opt/intel/mediasdk/plugins/
# rename all plugins, for example:
sudo mv libmfx_hevcd_hw64.so libmfx_hevcd_hw64.so.default
sudo mv libmfx_h264la_hw64.so libmfx_h264la_hw64.so.default
sudo mv libmfx_hevce_hw64.so libmfx_hevce_hw64.so.default
sudo mv libmfx_vp8d_hw64.so libmfx_vp8d_hw64.so.default
```

### 2. Build original version of open-source Intel Media SDK and samples

```sh
cd ~/msdk
export MFX_HOME=`pwd`
perl tools/builder/build_mfx.pl --cmake=intel64.make.release
make -j8 -C __cmake/intel64.make.release
```

### 3. Collect gold results

```sh
cd ~/msdk/tests
python3.5 ted.py --gold
```

### 4. Apply changes to Intel Media SDK, commit them, and rebuild library and samples

### 5. Run tests once again to compare with gold results

```sh
python3.5 ted.py
```

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.

### 6. Attach generated test_results.json to your pull request.
19 changes: 19 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
Copyright (c) 2017 Intel Corporation

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
88 changes: 88 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
# Intel® Media SDK
Intel® Media SDK provides an API to access hardware-accelerated video decode, encode and filtering on Intel® platforms with integrated graphics.

**Supported video encoders**: HEVC, AVC, MPEG-2, JPEG
**Supported Video decoders**: HEVC, AVC, VP8, MPEG-2, VC1, JPEG
**Supported video pre-processing filters**: Color Conversion, Deinterlace, Denoise, Resize, Rotate

# Important note
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.
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 ).

# FAQ
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).

# Table of contents

* [License](#license)
* [How to contribute](#how-to-contribute)
* [System requirements](#system-requirements)
* [How to build](#how-to-build)
* [Requirements](#requirements)
* [Build steps](#build-steps)
* [Enabling Instrumentation and Tracing Technology](#enabling-instrumentation-and-tracing-technology)
* [See also](#see-also)

# License
Intel Media SDK is licensed under MIT license. See [LICENSE](./LICENSE) for details.

# How to contribute
See [CONTRIBUTING](./CONTRIBUTING.md) for details. Thank you!

# System requirements
**Operating System:** CentOS 7.2 is the recommended and the only tested platform.
**Hardware:**
Intel platforms with integrated graphics:
- Intel® Xeon® E3-1200 v4 family with C226 chipset
- Intel Xeon E3-1200 and E3-1500 v5 families with C236 chipset
- 5th Generation Intel® Core™ processors
- 6th Generation Intel Core processors

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).

# How to build
## Requirements
- Git* (with [LFS](https://git-lfs.github.com/) support)
- Perl* v5.16+
- Cmake* v2.8+
- GCC* v4.8+
- Intel Media Server Studio

## Build steps

Get sources
```sh
git clone https://github.com/Intel-Media-SDK/MediaSDK msdk
cd msdk
```

Set up environment variables:
```sh
export MFX_HOME=`pwd`
```

Configure build with GCC (default) compiler:
```sh
perl tools/builder/build_mfx.pl --cmake=intel64.make.release
```
This will build MSDK binaries and MSDK samples.

If you want to configure build with CLang compiler use the following command:
```sh
perl tools/builder/build_mfx.pl --cmake=intel64.make.release.clang
```

Run build:
```sh
make -j8 -C __cmake/intel64.make.release
```

## Enabling Instrumentation and Tracing Technology
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.

**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.

# See also
Intel Media Server Studio: https://software.intel.com/en-us/intel-media-server-studio

Intel Media SDK: https://software.intel.com/en-us/media-sdk
Loading

0 comments on commit 1ec49c7

Please sign in to comment.