Changes between Version 1 and Version 2 of QuickSync


Ignore:
Timestamp:
Jul 19, 2017, 11:18:50 PM (5 weeks ago)
Author:
jkqxz
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • QuickSync

    v1 v2  
    1 WARNING:  DO NOT install the Intel Media SDK without being sure that you need it, especially on Linux.  In many cases you don't need it, and trying to use it may break other things. 
    2  
    3 "Intel Quick Sync Video" is the marketing name for a set of hardware features available inside many Intel GPUs. 
    4  
    5  
    6 == Hardware Support == 
    7  
    8 ||= Platform Name =||= Graphics =||= Adds support for... =|| 
    9 ||  Ironlake       ||  gen5      || MPEG-2, H.264 decode. || 
    10 ||  Sandy Bridge   ||  gen6      || VC-1 decode; H.264 encode. || 
    11 ||  Ivy Bridge     ||  gen7      || JPEG decode; MPEG-2 encode. || 
    12 ||  Bay Trail      ||  gen7      || - || 
    13 ||  Haswell        ||  gen7.5    || - || 
    14 ||  Broadwell      ||  gen8      || VP8 decode. || 
    15 ||  Braswell       ||  gen8      || H.265 decode; JPEG, VP8 encode. || 
    16 ||  Skylake        ||  gen9      || H.265 encode. || 
    17 ||  Apollo Lake    ||  gen9      || VP9, H.265 Main10 decode. || 
    18 ||  Kaby Lake      ||  gen9.5    || VP9 profile 2 decode; VP9, H.265 Main10 encode. || 
    19 ||  Gemini Lake    ||  gen9.5    || - || 
    20  
    21 (Each new platform supports a superset of the capabilities of the previous platform.) 
    22  
    23  
    24 == API Support == 
    25 The hardware can be accessed through a number of different APIs: 
    26  
    27 DXVA2 / D3D11VA 
    28   These are standard Windows APIs, which are implemented by the Intel graphics driver to support video decode. 
    29 libmfx on Linux 
    30   This is a library from Intel which can be installed as part of the Intel Media SDK, and supports a subset of encode and decode cases. 
    31 libmfx on Windows 
    32   This is a library supplied with Intel's graphics drivers which supports all encode and decode cases. 
    33 Media Foundation 
    34   Another Windows API which supports some encode and decode cases via the Intel graphics drivers.  Not supported in ffmpeg. 
    35 VAAPI with i965 driver 
    36   This is a mostly-free [#i965 (but see below)] driver for the libva / VAAPI instructure.  Most Linux distributions package it. 
    37 VAAPI with iHD driver 
    38   The back-end of libmfx on Linux uses a modified libva and VAAPI driver; this can also be used directly by the user. 
    39  
    40  
    41 == Linux == 
    42  
    43 It is strongly recommended to use VAAPI with the i965 driver if possible.  Only use libmfx if your use-case specifically requires its particular feature set. 
    44  
    45 VAAPI / i965 
    46 * Packaged as standard in most Linux distributions. 
    47 * Runs on all usable hardware, including older and cheaper devices. 
    48 * Wider codec support. 
    49 * Common API for applications which may also use AMD / Nvidia hardware with Mesa. 
    50 * Interopable with standard APIs (EGL/OpenGL, OpenCL). 
    51  
    52 libmfx 
    53 * May give better encode quality in some cases (?). 
    54 * May give higher encode throughput in some cases (particularly on Iris graphics). 
    55 * Common API for applications which may also run on Windows. 
    56 * Interoperable with Intel OpenCL implementation. 
    57  
    58  
    59 == Windows == 
    60  
    61 (TODO) 
    62  
    63  
    64 == Running == 
    65  
    66 === VAAPI === 
    67  
    68 See [wiki:Hardware/VAAPI]. 
    69  
    70  
    71 === DXVA2 / D3D11VA === 
    72  
    73  
    74 === libmfx === 
    75  
    76 The library has a large number of options to set, the possible valid values of are dependent on the version and hardware.  libavcodec attempts to map common options sensibly to the libmfx options, but the mapping is crude and has holes, especially around rate control. 
    77  
    78 Using an invalid combination is likely to provoke the message: "Selected ratecontrol mode is not supported by the QSV runtime. Choose a different mode."  Usually this message is accurate, but it can also refer to other issues like the lack of a usable device. 
    79  
    80  
    81 == Installing the Media SDK on Linux == 
    82  
    83 Note that the kernel patches and modified system libraries are all required.  It is recommended not to install this on any machine also used for other purposes, as it does not use normal distribution mechanisms and may break / be broken by other packages unexpectedly. 
    84  
    85 Build machine: 
    86 * Build and install the packaged dispatcher: <https://github.com/lu-zero/mfx_dispatch>.  (It is also possible to extract the necessary files from the Media SDK installation as described in the install manual - this is not recommended, just use the package instead.) 
    87 * Build ffmpeg with --enable-libmfx. 
    88  
    89 Target machine: 
    90 * Ensure the target machine has a supported CPU.  Current versions only support gen8/gen9 graphics on expensive CPUs ("Xeon"/"Core i" branding).  The same graphics cores on cheaper CPUs ("Pentium"/"Celeron"/"Atom" branding) are explicitly disabled, presumably for commercial reasons. 
    91 * Get a clean version of the supported kernel version (currently 4.4: <https://www.kernel.org/pub/linux/kernel/v4.x/linux-4.4.tar.xz>) and apply the supplied patches.  Build and install. 
    92 * Build and install the supplied libva and libdrm trees. 
    93 * Run the Media SDK install script to install the proprietary components. 
    94 * Reboot. 
    95  
    96  
    97 == Licence status of i965 VAAPI driver == 
    98  
    99 [=#i965] All of the user source code is available, but it includes proprietary blobs of compiled GPU code.  Since the complete human-readable source is not available, this certainly renders it GPL-incompatible and is likely to cause issues with other copyleft licences.  Using the libva dynamic-loading shim mostly sidesteps this, and therefore is encouraged. 
    100