Linux之FFmepg使用 Intel Media SDK 硬解

// 支持硬件
BDW (Broadwell)
SKL (Skylake)
BXT (Broxton) / APL (Apollo Lake)
KBLx (KBL/Kaby Lake; CFL/Coffe Lake; WHL/Whiskey Lake; CML/Comet Lake; AML/Amber Lake)
ICL (Ice Lake)
JSL (Jasper Lake)/EHL (Elkhart Lake)
TGL (Tiger Lake)
// 系统 Ubuntu 19.10 安装 ...
sudo apt-get install libva-dev libmfx-dev intel-media-va-driver-non-free vainfo
// i965_drv_video.so 为旧版驱动不受 Intel Media SDK 支持
// iHD_drv_video.so 检查正常才可以进行下一步 ...
// 查看驱动支持情况 ...
export LIBVA_DRIVER_NAME=iHD
vainfo 
// 编译 FFmpeg 4.4.2
./configure --arch=x86_64 --disable-yasm --enable-vaapi --enable-libmfx
make 

// 查看编译后的支持情况 ...
danoo@nulijiabei:~$ ffmpeg -decoders |grep h264
ffmpeg version 4.2.2 Copyright (c) 2000-2019 the FFmpeg developers
  built with gcc 9 (Ubuntu 9.2.1-9ubuntu2)
  configuration: --arch=x86_64 --disable-yasm --enable-vaapi --enable-libmfx --disable-static --enable-shared
  libavutil      56. 31.100 / 56. 31.100
  libavcodec     58. 54.100 / 58. 54.100
  libavformat    58. 29.100 / 58. 29.100
  libavdevice    58.  8.100 / 58.  8.100
  libavfilter     7. 57.100 /  7. 57.100
  libswscale      5.  5.100 /  5.  5.100
  libswresample   3.  5.100 /  3.  5.100
 VFS..D h264                 H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10
 V..... h264_v4l2m2m         V4L2 mem2mem H.264 decoder wrapper (codec h264)
 V....D h264_qsv             H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 (Intel Quick Sync Video acceleration) (codec h264)
// 关于 FFmepg Hardware QuickSync
// http://trac.ffmpeg.org/wiki/Hardware/QuickSync   
https://github.com/Intel-Media-SDK/MediaSDK/wiki/Build-and-use-ffmpeg-with-MediaSDK
https://github.com/intel/media-driver