!!!(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. GS运维常用工具及文档

    规范部分   GS产品线性能问题处理流程:http://gsk.inspur.com/File/t-4244 XXX项目性能问题信息收集单-模板:http://gsk.inspur.com/File/ ...

  2. html中canvas渲染图片,并转化成base64格式保存

    最近在做一个上传头像然后保存显示的功能,因为涉及到裁剪大小和尺寸比例,所以直接上传图片再展示的话,就会出现问题,所以就想用canvas来渲染裁剪后的图片,然后转化成base64格式的图片再存储,这样取 ...

  3. Django models 常用字段类型

    1.CharField字符串字段,存较短的字符串,长文本要用TextField.必须的参数:max_length 字符的最大长度2.TextField容量很大的文本字段.admin中用 <tex ...

  4. 百鸡百钱===百马百担====for循环嵌套

    package com.zuoye.test;//百鸡百钱5文钱可以买一只公鸡,3文钱可以买一只母鸡,1文钱可以买3只雏鸡.public class Baiji { public static voi ...

  5. C# Socket发送接收字节数组和十六16进制之间转换函数

    近期在使用远程网络模块的时候, 需要用的Socket发送数据,远程模块指令为16进制. 官方提供的DEMO比较繁琐.不方便新手使用. 下面的转换函数可大大方便新手使用. // 16进制字符串转字节数组 ...

  6. OpenCV : 基于切线方向的边缘增强算法

    使用切线方法,对切线方向上的边缘进行强化: 参考连接:图像锐化和边缘检测 代码: //在种子点方向上寻找合适的梯度,用于寻找边缘 //对low_Gray, high_gray之间的点寻找边缘 void ...

  7. Maven常见异常及解决方法

    异常1: [ERROR] Failed to execute goal on project biz_zhuhai: Could not resolve dependencies for projec ...

  8. node、Mongo项目如何前后端分离提供接口给前端

    node接口编写,vue-cli代理接口方法  通常前端使用的MocK 数据的方法,去模拟假的数据,但是如果有node Mongodb 去写数据的话就不需要在去mock 数据了,具体的方法如下. 首先 ...

  9. reset清除所有浏览器默认样式

    温馨提示 reset 的目的不是清除浏览器的默认样式, 这仅是部分工作. 清除和重置是紧密不可分的.reset 的目的不是让默认样式在所有浏览器下一致, 而是减少默认样式有可能带来的问题.reset ...

  10. Spring Cloud-Zuul(十)

    个人理解 在微服务体系体系中 我们会有很多服务.在内部体系中 通过eureka实现服务的自动发现通过ribbon实现服务的调用.但是如果对外部体系提供接口 我们就会涉及到接口的安全性,我们不能可能对每 ...