!!!(gcc/g++版本要在4.8以上,本人使用的是5.4版本)

要先安装依赖,按以下步骤依次执行

1.LIBVA

git clone https://github.com/intel/libva.git
cd libva/
./autogen.sh
./configure
make
make install
cp /usr/local/include/va/* /usr/include/
cp /usr/local/lib/libva* /usr/lib64/

2.Intel(R) Graphics Memory Management Library(gmmlib)(可以不用单独安装,安装Media Driver时会附带安装)

Introduction

The Intel(R) Graphics Memory Management Library provides device specific and buffer management for the Intel(R) Graphics Compute Runtime for OpenCL(TM) and the Intel(R) Media Driver for VAAPI.

License

The Intel(R) Graphics Memory Management Library is distributed under the MIT Open Source license.

You may obtain a copy of the License at:

https://opensource.org/licenses/MIT

Building

Get gmmlib repo, make it look like

        <workspace>

    |- GmmLib

$ mkdir <workspace>/build

$ cd <workspace>/build

cmake [-DCMAKE_BUILD_TYPE= Release | Debug | ReleaseInternal] [-DARCH=  | ] ../GmmLib

$ make -j8 ( Also performs compile time ULT)

Build步骤如下:

    mkdir workspace && cd workspace/
git clone https://github.com/intel/gmmlib.git
mkdir build && cd build
cmake [-DCMAKE_BUILD_TYPE= Release] [-DARCH= ] ../gmmlib
make -j8
执行完make以后会得到如下结果:
[ %] Linking CXX static library libgmm_umd.a
[ %] Built target gmm_umd
[ %] Linking CXX shared library libigdgmm64.so
[ %] Built target igfx_gmmumd_dll
[ %] Linking CXX static library libigfx_gmmumd_excite.a
[ %] Built target igfx_gmmumd_excite
Scanning dependencies of target GMMULT
[ %] Building CXX object Source/GmmLib/ULT/CMakeFiles/GMMULT.dir/GmmCachePolicyULT.cpp.o
[ %] Building CXX object Source/GmmLib/ULT/CMakeFiles/GMMULT.dir/GmmCommonULT.cpp.o
[ %] Building CXX object Source/GmmLib/ULT/CMakeFiles/GMMULT.dir/GmmGen10CachePolicyULT.cpp.o
[ %] Building CXX object Source/GmmLib/ULT/CMakeFiles/GMMULT.dir/GmmGen9CachePolicyULT.cpp.o
[ %] Building CXX object Source/GmmLib/ULT/CMakeFiles/GMMULT.dir/GmmGen10ResourceULT.cpp.o
[ %] Building CXX object Source/GmmLib/ULT/CMakeFiles/GMMULT.dir/GmmGen9ResourceULT.cpp.o
[ %] Building CXX object Source/GmmLib/ULT/CMakeFiles/GMMULT.dir/GmmResourceCpuBltULT.cpp.o
[ %] Linking CXX static library libigfxgmmumd.a
[ %] Built target igfxgmmumd

把生成的动态和静态库拷贝到 /usr/lib64 目录下:

cp Source/GmmLib/libgmm_umd.a /usr/lib64/ &&
cp Source/GmmLib/libigdgmm64.so /usr/lib64/ &&
cp Source/GmmLib/libigfx_gmmumd_excite.a /usr/lib64/ &&
cp Source/GmmLib/libigfxgmmumd.a /usr/lib64/

Install

Not a stand alone software component. GmmLib is build as static library for Intel media driver and Compute runtime for OpenCL Supported Platforms

Intel Atom and Core Processors supporting Gen9/Gen10 graphics devices

BDW (Broadwell)

SKL (Skylake)

CNL (Cannonlake)

3.Intel(R) Media Driver for VAAPI

Introduction

The Intel(R) Media Driver for VAAPI is a new VA-API (Video Acceleration API) user mode driver supporting hardware accelerated decoding, encoding, and video post processing for GEN based graphics hardware.

License

The Intel(R) Media Driver for VAAPI is distributed under the MIT license with portions covered under the BSD 3-clause "New" or "Revised" License. You may obtain a copy of the License at: https://opensource.org/licenses/MIT & https://opensource.org/licenses/BSD-3-Clause

Prerequisites

For Ubuntu 16.04 and above 
apt install autoconf libtool libdrm-dev xorg xorg-dev openbox libx11-dev libgl1-mesa-glx libgl1-mesa-dev 
Equivalents for other distributions should work.

Dependencies

Libva - https://github.com/intel/libva 
GmmLib - https://github.com/intel/gmmlib (please check https://github.com/intel/media-driver/wiki/Comparability-with-GmmLib)

Building

 . Build and install libva master
. Get gmmlib and media repo and format the workspace folder as below (suggest the workspace to be a dedicated one for media driver build):
<workspace>
|- gmmlib
|- media-driver $ mkdir <workspace>/build_media $ cd <workspace>/build_media $ cmake ../media-driver \
-DCMAKE_INSTALL_PREFIX=/usr \
-DMEDIA_VERSION="2.0.0" \
-DBUILD_ALONG_WITH_CMRTLIB= \
-DBS_DIR_GMMLIB=`pwd`/../gmmlib/Source/GmmLib/ \
-DBS_DIR_COMMON=`pwd`/../gmmlib/Source/Common/ \
-DBS_DIR_INC=`pwd`/../gmmlib/Source/inc/ \
-DBS_DIR_MEDIA=`pwd`/../media-driver Alternatively, copy
<workspace>/media-driver/unified_cmake.sh into
<workspace>/build_media then run
$ ./unified_cmake.sh $ make -j8 Install
$ sudo make install This will install the following files (e.g. on Ubuntu):
-- Installing: /usr/lib/x86_64-linux-gnu/dri/iHD_drv_video.so
-- Installing: /etc/profile.d/intel-media.sh
-- Installing: /usr/lib/x86_64-linux-gnu/igfxcmrt64.so

Build步骤如下:

    cd workspace/
git clone https://github.com/intel/media-driver.git
mkdir build_media && cd build_media/
cp ../media-driver/unified_cmake.sh ./
./unified_cmake.sh
   make -j8
   make install
执行unified_cmake.sh脚本时可能会报如下错误:
CMake Error at /usr/local/share/cmake-3.5/Modules/FindPkgConfig.cmake: (message):
A required package was not found
Call Stack (most recent call first):
/usr/local/share/cmake-3.5/Modules/FindPkgConfig.cmake: (_pkg_check_modules_internal)
cmrtlib/linux/CMakeLists.txt: (pkg_check_modules) -- Configuring incomplete, errors occurred!
See also "/opt/MediaDriver/build_media/CMakeFiles/CMakeOutput.log".

解决方法:

vim /usr/local/share/cmake-3.5/Modules/FindPkgConfig.cmake
在356行,把set(_pkg_check_modules_failed 1)改为set(_pkg_check_modules_failed 0)
再执行./unified_cmake.sh

执行make install后,无错误的情况如下:

Install the project...
-- Install configuration: ""
-- Installing: /home/tvu/hevc_shmenc_new/shmenc/3rdparty/libva-1.8./lib/lib/dri/iHD_drv_video.so
-- Installing: /usr/lib64/igfxcmrt64.so
-- Installing: /etc/profile.d/intel-media.sh

命令行输入:echo $LIBVA_DRIVERS_PATH 查看环境变量的值,如下:

/usr/intel/mediasdk/lib64 

执行 ls /usr/intel/mediasdk/lib64 可以看到此目录下有如下文件:

iHD_drv_video.so  libmfxhw64-p.so.1.19  libmfxhw64.so  libmfxsw64-p.so.1.19  libmfxsw64.so

iHD_drv_video.so  libdispatch_shared.a  libmfx.a  libmfxhw64-p.so.1.19  libmfxhw64-p.so.1.26  libmfxhw64.so  libmfxsw64-p.so.1.19  libmfxsw64.so  pkgconfig 

执行如下命令替换掉 /usr/intel/mediasdk/lib64/iHD_drv_video.so(此步骤也可以在装完MediaSDK后执行):

cp /home/tvu/hevc_shmenc_new/shmenc/3rdparty/libva-1.8./lib/lib/dri/iHD_drv_video.so  /usr/intel/mediasdk/lib64/

然后执行vainfo的到如下结果:

error: can't connect to X server!
libva info: VA-API version 1.1.
libva info: va_getDriverName() returns
libva info: User requested driver 'iHD'
libva info: Trying to open /usr/intel/mediasdk/lib64/iHD_drv_video.so
libva info: Found init function __vaDriverInit_1_1
libva info: va_openDriver() returns
vainfo: VA-API version: 1.1 (libva 1.67..pre1)
vainfo: Driver version: Intel iHD driver - 2.0.
vainfo: Supported profile and entrypoints
VAProfileNone : VAEntrypointVideoProc
VAProfileNone : <unknown entrypoint>
VAProfileMPEG2Simple : VAEntrypointVLD
VAProfileMPEG2Main : VAEntrypointVLD
VAProfileH264Main : VAEntrypointVLD
VAProfileH264Main : VAEntrypointEncSlice
VAProfileH264Main : <unknown entrypoint>
VAProfileH264Main : <unknown entrypoint>
VAProfileH264High : VAEntrypointVLD
VAProfileH264High : VAEntrypointEncSlice
VAProfileH264High : <unknown entrypoint>
VAProfileH264High : <unknown entrypoint>
VAProfileVC1Simple : VAEntrypointVLD
VAProfileVC1Main : VAEntrypointVLD
VAProfileVC1Advanced : VAEntrypointVLD
VAProfileJPEGBaseline : VAEntrypointVLD
VAProfileJPEGBaseline : VAEntrypointEncPicture
VAProfileH264ConstrainedBaseline: VAEntrypointVLD
VAProfileH264ConstrainedBaseline: VAEntrypointEncSlice
VAProfileH264ConstrainedBaseline: <unknown entrypoint>
VAProfileH264ConstrainedBaseline: <unknown entrypoint>
VAProfileVP8Version0_3 : VAEntrypointVLD
VAProfileHEVCMain : VAEntrypointVLD
VAProfileHEVCMain : VAEntrypointEncSlice
VAProfileHEVCMain : <unknown entrypoint>
VAProfileHEVCMain10 : VAEntrypointVLD
VAProfileVP9Profile0 : VAEntrypointVLD

*注意:没替换掉 /usr/intel/mediasdk/lib64/iHD_drv_video.so的情况下,命令行执行vainfo可能会出现以下情况:

error: can't connect to X server!
libva info: VA-API version 1.1.
libva info: va_getDriverName() returns
libva info: User requested driver 'iHD'
libva info: Trying to open /usr/intel/mediasdk/lib64/iHD_drv_video.so
libva error: /usr/intel/mediasdk/lib64/iHD_drv_video.so has no function __vaDriverInit_1_0
libva info: va_openDriver() returns -
vaInitialize failed with error code - (unknown libva error),exit

4.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, Composition Important note

The current version of Intel Media SDK is compatible with the open source Intel Media Driver for VAAPI. Intel Media SDK depends on LibVA. FAQ

You can find answers for the most frequently asked questions here. Table of contents

  • License
  • How to contribute
  • Documentation
  • Products which use Media SDK
  • System requirements
  • How to build
  • Requirements
  • Build steps

License

Intel Media SDK is licensed under MIT license. See LICENSE for details.

How to contribute

See CONTRIBUTING for details. Thank you!

Documentation

Please find full documentation under the doc/ folder. Key documents:

  • Media SDK Developer Reference
  • Media SDK Developer Reference Extensions for User-Defined Functions
  • Media Samples Guide

You may also wish to visit Intel Media Server Studio support page for additional documentation.

products which use Media SDK

  • Intel Media Server Studio
  • Intel Media SDK for Embedded Linux

System requirements

Operating System: Linux

Software:

  • LibVA
  • VAAPI backend driver:
    Intel Media Driver for VAAPI
  • Some features require CM Runtime library (part of Intel Media Driver for VAAPI package)

Hardware: Intel platforms supported by the Intel Media Driver for VAAPI

Media SDK test and sample applications may require additional software packages (for example, X Server, Wayland, LibDRM, etc.) to be functional.

How to build

Requirements
  • Git* (with LFS support)
  • Perl* v5.16+
  • Cmake* v2.8+
  • GCC* v4.8+
  • LibVA

Build steps

Get sources

git clone https://github.com/Intel-Media-SDK/MediaSDK msdk
cd msdk

Configure build with GCC (default) compiler:

perl tools/builder/build_mfx.pl --cmake=intel64.make.release

这时会报如下错误:

CMake Error at builder/FindTrace.cmake: (include):
include could not find load file
/usr/intel/mediasdk/builder/FindVTune.cmake
Call Stack (most recent call first):
CMakeLists.txt: (include)

解决方法:

mkdir /usr/intel/mediasdk/builder/
cp builder/* /usr/intel/mediasdk/builder/

再执行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:

perl tools/builder/build_mfx.pl --cmake=intel64.make.release.clang

Run build:

make -j8 -C __cmake/intel64.make.release

Intel Media SDK安装步骤的更多相关文章

  1. Intel® Media SDK Media Samples Linux 学习笔记(转)

    最近折腾intel media sdk,主要硬件平台是在HD4600的核显上进行测试,intel media sdk是intel提供的一种基于核显的硬件编解码的解决方案,之前已经有使用ffmpeg进行 ...

  2. Intel Media SDK H264 encoder GOP setting

    1 I帧,P帧,B帧,IDR帧,NAL单元 I frame:帧内编码帧,又称intra picture,I 帧通常是每个 GOP(MPEG 所使用的一种视频压缩技术)的第一个帧,经过适度地压缩,做为随 ...

  3. (转)Integrating Intel® Media SDK with FFmpeg for mux/demuxing and audio encode/decode usages 1

    Download Article and Source Code Download Integrating Intel® Media SDK with FFmpeg for mux/demuxing ...

  4. Getting Started with the Intel Media SDK

    By Gael Hofemeier on March 19, 2015 Follow Gael on Twitter: @GaelHof Media SDK Developer’s Guide Med ...

  5. Intel® Media SDK(一)

    A cross-platform API for developing media applications on Windows* Fast video playback, encode, proc ...

  6. Intel Media SDK 性能測试

    经过測试,发如今windows 7上 i3 i5 上Intel Media SDK 1080P仅仅能解6路,720P仅仅能解8路, 不知大家有没有測试过?

  7. 微软商店一直安装不上Intel Media SDK DFP

    具体表现为一直安装失败,但是下载进度条一直在,无法去除. 此方法来自 https://answers.microsoft.com/en-us/windows/forum/all/error-code- ...

  8. python3.3.5x64+win2003x64+aliyun oss sdk安装步骤

    参考文章:https://help.aliyun.com/document_detail/32026.html?spm=5176.doc31890.6.690.S6ZrRn 1.安装python3.3 ...

  9. Android sdk安装目录中没有platform-tools目录问题详解

    sdk下载地址 http://tools.android-studio.org/index.php/sdk 安装步骤很简单,百度即可. 下面详细说一下,在安装中遇到android sdk下没有plat ...

随机推荐

  1. 使用Attiny 85开发板制作BadUSB

    什么是BadUSB?请查看:http://www.baike.com/wiki/BadUSB 或者看看腾讯这个视频!https://v.qq.com/x/page/l01425u2igw.html   ...

  2. scrollWidth clientWidth offsetWidth

    scrollWidth:对象的实际内容的宽度,不包边线宽度,会随对象中内容超过可视区后而变大.         实际内容+padding                 不包括滚动条 边框client ...

  3. create-react-app 中设置反向代理、项目打包资源引入路径设置及 map 文件

    1.配置反向代理 (1)porxy 配置一个代理 修改package.json文件 "proxy":"http://teng.com/website/web", ...

  4. ArrayList<HashMap<String,Object>>集锦

    1.   Android中如何从一个Activity中ArrayList<HashMap<String,Object>>传递到另一个activity?      eg:     ...

  5. Java关于反射的用法

    一. 首先是准备一个需要反射的类 public class Person { private String name; private int age; public String sex; publ ...

  6. 【Oracle】设置快速恢复区及reset快速恢复区

    快速恢复区 概念 是一个默认放置所有备份恢复操作有关文件的地方,包括:控制文件在线镜像.在线重做日志.归档日志.外来归档日志.控制文件镜像复制.数据文件镜像复制.RMAN备份片和闪回日志. 如果启用的 ...

  7. Swift - AnyClass,元类型和 .self

    在Swift中能够表示 “任意” 这个概念的除了 Any 和 AnyObject 以外,还有一个AnyClass.我们能够使用AnyClass协议作为任意类型实例的具体类型.AnyClass在Swif ...

  8. spirngMvc

    配置方式就略了 直接开始注解方式: 1.  新建项目 2.  导入jar包 3.  创建controller,用注解方式声明 4.  在web.xml配置核心分发器DispatcherServlet ...

  9. spring 回顾

    主要就是它的IOC理念 即:把对象的创建.初始化.销毁等工作交给spring容器来做 依赖jar

  10. java模拟Cookies登陆

    在使用java访问URL时,如果该URL需要身份验证,那么就不能够直接访问,因为没有登陆.那么,如何解决这个问题呢? 方法是使用java模拟登陆,登陆后记录下cookie信息,在下次发起请求时时将co ...