1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 | # 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 [MIT](https://opensource.org/licenses/MIT) & [BSD-3-Clause](https://opensource.org/licenses/BSD-3-Clause) ## Prerequisites For Ubuntu 16.04+ ``` 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 [comparability with GmmLib](https://github.com/intel/media-driver/wiki/Comparability-with-GmmLib)) ## Building 1. Build and install libva master 2. Build and install gmmlib master 3. Get media repo and format the workspace folder as below (suggest the workspace to be a dedicated one for media driver build): ``` <workspace> |- media-driver ``` 4. Create build_media new folder under your workspace ``` $ mkdir <workspace>/build_media ``` then the workspace looks like below ``` <workspace> |- media-driver |- build_media ``` 5. ``` $ cd <workspace>/build_media ``` 6. ``` $ cmake ../media-driver ``` 7. ``` $ make -j"$(nproc)" ``` ## 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 ``` For iHD_drv_video.so please export related LIBVA environment variables. ``` export LIBVA_DRIVERS_PATH=<path-contains-iHD_drv_video.so> export LIBVA_DRIVER_NAME=iHD ``` ## Supported Platforms * 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) * DG1/SG1 ## Components and Features Media driver contains three components as below * **Video decoding** calls hardware-based decoder([VDBox](https://01.org/sites/default/files/documentation/intel-gfx-prm-osrc-kbl-vol08-media_vdbox.pdf)) which provides fully-accelerated hardware video decoding to release the graphics engine for other operations. * **Video encoding** supports two modes, one calls hardware-based encoder([VDEnc](https://01.org/sites/default/files/documentation/intel-gfx-prm-osrc-kbl-vol08-media_vdbox.pdf)/[Huc](https://01.org/linuxgraphics/downloads/firmware?langredirect=1)) to provide low power encoding, another one is hardware([PAK](https://01.org/sites/default/files/documentation/intel-gfx-prm-osrc-kbl-vol08-media_vdbox.pdf))+shader(media kernel+[VME](https://01.org/sites/default/files/documentation/intel-gfx-prm-osrc-kbl-vol04-configurations.pdf)) based encoding. User could choose the mode through VA-API. * **Video processing** supports several popular features by hardware-based video processor([VEBox/SFC](https://01.org/sites/default/files/documentation/intel-gfx-prm-osrc-kbl-vol09-media_vebox.pdf)) and shader(media kernel) based solution together. Media driver supports two build types as below * **Full Feature Build** is default driver build, which supports all feature by hardware accelerator and close source shaders(media kernel binaries). Ubuntu [intel-media-va-driver-non-free](https://packages.ubuntu.com/disco/intel-media-va-driver-non-free) package is generated from this build type. * **Free Kernel Build**, enables fully open source shaders(media kernels) and hardware features but the features would be limited. Ubuntu [intel-media-va-driver](https://packages.ubuntu.com/disco/intel-media-va-driver) package is generated from this build type. ### Decoding/Encoding Features |CODEC | Build Types | BDW | SKL | BXT/APL | KBLx | ICL | EHL/JSL | TGL/RKL/ADL-S/ADL-P| DG1/SG1 | |---|---|---|---|---|---|---|---|---|---| | AVC | <u>Full-Feature</u><br><i>Free-Kernel</i> | <u>D/Es</u><br><i>D<i> | <u>D/E/Es</u><br><i>D/E<i> | <u>D/E/Es</u><br><i>D/E<i> | <u>D/E/Es</u><br><i>D/E<i> | <u>D/E/Es</u><br><i>D/E<i> | <u>D/E</u><br><i>D/E<i> | <u>D/E/Es</u><br><i>D/E<i> | <u>D/E/Es</u><br><i>D/E<i> | | MPEG-2 | <u>Full-Feature</u><br><i>Free-Kernel</i> | <u>D/Es</u><br><i>D<i> | <u>D/Es</u><br><i>D<i> | <u>D</u><br><i>D<i> | <u>D/Es</u><br><i>D<i> | <u>D/Es</u><br><i>D<i> | <u>D</u><br><i>D<i> | <u>D/Es</u><br><i>D<i> | <u>D/Es</u><br><i>D<i> | | VC-1 | <u>Full-Feature</u><br><i>Free-Kernel</i> | <u>D</u><br><i> <i> | <u>D</u><br><i> <i> | <u>D</u><br><i> <i> | <u>D</u><br><i> <i> | <u>D</u><br><i> <i> | <u>D</u><br><i> <i> | <u>D</u><br><i> <i> | <u>D</u><br><i> <i> | | JPEG | <u>Full-Feature</u><br><i>Free-Kernel</i> | <u>D</u><br><i>D<i> | <u>D/E</u><br><i>D/E<i> | <u>D/E</u><br><i>D/E<i> | <u>D/E</u><br><i>D/E<i> | <u>D/E</u><br><i>D/E<i> | <u>D/E</u><br><i>D/E<i> | <u>D/E</u><br><i>D/E<i> | <u>D/E</u><br><i>D/E<i> | | VP8 | <u>Full-Feature</u><br><i>Free-Kernel</i> | <u>D</u><br><i>D<i> | <u>D</u><br><i>D<i> | <u>D</u><br><i>D<i> | <u>D/Es</u><br><i>D<i> | <u>D/Es</u><br><i>D<i> | <u>D</u><br><i>D<i> | <u>D*</u><br><i>D*<i> | | | HEVC 8bit | <u>Full-Feature</u><br><i>Free-Kernel</i> | | <u>D/Es</u><br><i>D<i> | <u>D/Es</u><br><i>D<i> | <u>D/Es</u><br><i>D<i> | <u>D/E/Es</u><br><i>D/E<i> | <u>D/E</u><br><i>D/E<i> | <u>D/E/Es</u><br><i>D/E<i> | <u>D/E/Es</u><br><i>D/E<i> | | HEVC 8bit 422 | <u>Full-Feature</u><br><i>Free-Kernel</i> | | | | | <u>D/Es</u><br><i>D<i> | <u>D</u><br><i>D<i> | <u>D/Es</u><br><i>D<i> | <u>D/Es</u><br><i>D<i> | | HEVC 8bit 444 | <u>Full-Feature</u><br><i>Free-Kernel</i> | | | | | <u>D/E</u><br><i>D/E<i> | <u>D/E</u><br><i>D/E<i> | <u>D/E</u><br><i>D/E<i> | <u>D/E</u><br><i>D/E<i> | | HEVC 10bit | <u>Full-Feature</u><br><i>Free-Kernel</i> | | | <u>D</u><br><i>D<i> | <u>D/Es</u><br><i>D<i> | <u>D/E/Es</u><br><i>D/E<i> | <u>D/E</u><br><i>D/E<i> | <u>D/E/Es</u><br><i>D/E<i> | <u>D/E/Es</u><br><i>D/E<i> | | HEVC 10bit 422 | <u>Full-Feature</u><br><i>Free-Kernel</i> | | | | | <u>D/Es</u><br><i>D<i> | <u>D</u><br><i>D<i> | <u>D/Es</u><br><i>D<i> | <u>D/Es</u><br><i>D<i> | | HEVC 10bit 444 | <u>Full-Feature</u><br><i>Free-Kernel</i> | | | | | <u>D/E</u><br><i>D/E<i> | <u>D/E</u><br><i>D/E<i> | <u>D/E</u><br><i>D/E<i> | <u>D/E</u><br><i>D/E<i> | | HEVC 12bit | <u>Full-Feature</u><br><i>Free-Kernel</i> | | | | | | | <u>D/Es</u><br><i>D<i> | <u>D/Es</u><br><i>D<i> | | HEVC 12bit 422 | <u>Full-Feature</u><br><i>Free-Kernel</i> | | | | | | | <u>D</u><br><i>D<i> | <u>D</u><br><i>D<i> | | HEVC 12bit 444 | <u>Full-Feature</u><br><i>Free-Kernel</i> | | | | | | | <u>D</u><br><i>D<i> | <u>D</u><br><i>D<i> | | VP9 8bit | <u>Full-Feature</u><br><i>Free-Kernel</i> | | | <u>D</u><br><i>D<i> | <u>D</u><br><i>D<i> | <u>D/E</u><br><i>D/E<i> | <u>D/E</u><br><i>D/E<i> | <u>D/E</u><br><i>D/E<i> | <u>D/E</u><br><i>D/E<i> | | VP9 8bit 444 | <u>Full-Feature</u><br><i>Free-Kernel</i> | | | | | <u>D/E</u><br><i>D/E<i> | <u>D/E</u><br><i>D/E<i> | <u>D/E</u><br><i>D/E<i> | <u>D/E</u><br><i>D/E<i> | | VP9 10bit | <u>Full-Feature</u><br><i>Free-Kernel</i> | | | | <u>D</u><br><i>D<i> | <u>D/E</u><br><i>D/E<i> | <u>D/E</u><br><i>D/E<i> | <u>D/E</u><br><i>D/E<i> | <u>D/E</u><br><i>D/E<i> | | VP9 10bit 444 | <u>Full-Feature</u><br><i>Free-Kernel</i> | | | | | <u>D/E</u><br><i>D/E<i> | <u>D/E</u><br><i>D/E<i> | <u>D/E</u><br><i>D/E<i> | <u>D/E</u><br><i>D/E<i> | | VP9 12bit | <u>Full-Feature</u><br><i>Free-Kernel</i> | | | | | | | <u>D</u><br><i>D<i> | <u>D</u><br><i>D<i> | | VP9 12bit 444 | <u>Full-Feature</u><br><i>Free-Kernel</i> | | | | | | | <u>D</u><br><i>D<i> | <u>D</u><br><i>D<i> | | AV1 8bit | <u>Full-Feature</u><br><i>Free-Kernel</i> | | | | | | | <u>D</u><br><i>D**<i> | <u>D</u><br><i>D**<i> | | AV1 10bit | <u>Full-Feature</u><br><i>Free-Kernel</i> | | | | | | | <u>D</u><br><i>D**<i> | <u>D</u><br><i>D**<i> | * D - Hardware Decoding * E - Hardware Encoding, Low Power Encoding(VDEnc/Huc) * Es - Hardware(PAK) + Shader(media kernel+VME) Encoding \* VP8 decoding is only supported on TGL platform \** AV1 film grain kernel is not open source yet which doesn't necessarily match the libaom algorithm or film grain synthesis. For more information, please refer to * [Media Features Summary](https://github.com/intel/media-driver/blob/master/docs/media_features.md#media-features-summary) * [Supported Decoding Output Format and Max Resolution](https://github.com/intel/media-driver/blob/master/docs/media_features.md#supported-decoding-output-format-and-max-resolution) * [Supported Encoding Input Format and Max Resolution](https://github.com/intel/media-driver/blob/master/docs/media_features.md#supported-encoding-input-format-and-max-resolution) ### Video Processing Features | Features | Build Types | BDW | SKL | BXT/APL | KBLx | ICL | EHL/JSL | TGL/RKL/ADL-S/ADL-P | DG1/SG1 | |---|---|---|---|---|----|---|---|---|---| | Blending | <u>Full-Feature</u><br><i>Free-Kernel</i> | <u>Yes</u><br><i> </i> | <u>Yes</u><br><i> </i> | <u>Yes</u><br><i> </i> | <u>Yes</u><br><i> </i> | <u>Yes</u><br><i>Yes</i> | <u>Yes</u><br><i>Yes</i> | <u>Yes</u><br><i>Yes</i> | <u>Yes</u><br><i>Yes</i> | | CSC<br>(Color Space Conversion) | <u>Full-Feature</u><br><i>Free-Kernel</i> | <u>Yes</u><br><i> </i> | <u>Yes</u><br><i> </i> | <u>Yes</u><br><i> </i> | <u>Yes</u><br><i> </i> | <u>Yes</u><br><i>Yes</i> | <u>Yes</u><br><i>Yes</i> | <u>Yes</u><br><i>Yes</i> | <u>Yes</u><br><i>Yes</i> | | De-interlace | <u>Full-Feature</u><br><i>Free-Kernel</i> | <u>Yes</u><br><i> </i> | <u>Yes</u><br><i> </i> | <u>Yes</u><br><i> </i> | <u>Yes</u><br><i> </i> | <u>Yes</u><br><i>Yes</i> | <u>Yes*</u><br><i>Yes*</i> | <u>Yes</u><br><i>Yes</i> | <u>Yes</u><br><i>Yes</i> | | De-noise | <u>Full-Feature</u><br><i>Free-Kernel</i> | <u>Yes</u><br><i> </i> | <u>Yes</u><br><i> </i> | <u>Yes</u><br><i> </i> | <u>Yes</u><br><i> </i> | <u>Yes</u><br><i> </i> | <u>No</u><br><i> </i> | <u>Yes</u><br><i> </i> | <u>Yes</u><br><i> </i> | | Luma Key | <u>Full-Feature</u><br><i>Free-Kernel</i> | <u>Yes</u><br><i> </i> | <u>Yes</u><br><i> </i> | <u>Yes</u><br><i> </i> | <u>Yes</u><br><i> </i> | <u>Yes</u><br><i>Yes</i> | <u>Yes</u><br><i>Yes</i> | <u>Yes</u><br><i>Yes</i> | <u>Yes</u><br><i>Yes</i> | | Mirroring | <u>Full-Feature</u><br><i>Free-Kernel</i> | <u>Yes</u><br><i> </i> | <u>Yes</u><br><i> </i> | <u>Yes</u><br><i> </i> | <u>Yes</u><br><i> </i> | <u>Yes</u><br><i>Yes</i> | <u>Yes</u><br><i>Yes</i> | <u>Yes</u><br><i>Yes</i> | <u>Yes</u><br><i>Yes</i> | | ProcAmp<br>(brightness,contrast,hue,saturation) | <u>Full-Feature</u><br><i>Free-Kernel</i> | <u>Yes</u><br><i> </i> | <u>Yes</u><br><i> </i> | <u>Yes</u><br><i> </i> | <u>Yes</u><br><i> </i> | <u>Yes</u><br><i>Yes</i> | <u>Yes</u><br><i>Yes</i> | <u>Yes</u><br><i>Yes</i> | <u>Yes</u><br><i>Yes</i> | | Rotation | <u>Full-Feature</u><br><i>Free-Kernel</i> | <u>Yes</u><br><i> </i> | <u>Yes</u><br><i> </i> | <u>Yes</u><br><i> </i> | <u>Yes</u><br><i> </i> | <u>Yes</u><br><i>Yes</i> | <u>Yes</u><br><i>Yes</i> | <u>Yes</u><br><i>Yes</i> | <u>Yes</u><br><i>Yes</i> | | Scaling | <u>Full-Feature</u><br><i>Free-Kernel</i> | <u>Yes</u><br><i> </i> | <u>Yes</u><br><i> </i> | <u>Yes</u><br><i> </i> | <u>Yes</u><br><i> </i> | <u>Yes</u><br><i>Yes</i> | <u>Yes</u><br><i>Yes</i> | <u>Yes</u><br><i>Yes</i> | <u>Yes</u><br><i>Yes</i> | | Sharpening | <u>Full-Feature</u><br><i>Free-Kernel</i> | <u>Yes</u><br><i> </i> | <u>Yes</u><br><i> </i> | <u>Yes</u><br><i> </i> | <u>Yes</u><br><i> </i> | <u>Yes</u><br><i>Yes</i> | <u>Yes</u><br><i>Yes</i> | <u>Yes</u><br><i>Yes</i> | <u>Yes</u><br><i>Yes</i> | | STD/E<br>(Skin Tone Detect & Enhancement) | <u>Full-Feature</u><br><i>Free-Kernel</i> | <u>Yes</u><br><i> </i> | <u>Yes</u><br><i> </i> | <u>Yes</u><br><i> </i> | <u>Yes</u><br><i> </i> | <u>Yes</u><br><i> </i> | <u>No</u><br><i> </i> | <u>Yes</u><br><i> </i> | <u>Yes</u><br><i> </i> | | TCC<br>(Total Color Control) | <u>Full-Feature</u><br><i>Free-Kernel</i> | <u>Yes</u><br><i> </i> | <u>Yes</u><br><i> </i> | <u>Yes</u><br><i> </i> | <u>Yes</u><br><i> </i> | <u>Yes</u><br><i> </i> | <u>No</u><br><i> </i> | <u>Yes</u><br><i> </i> | <u>Yes</u><br><i> </i> | | Color fill | <u>Full-Feature</u><br><i>Free-Kernel</i> | <u>Yes</u><br><i> </i> | <u>Yes</u><br><i> </i> | <u>Yes</u><br><i> </i> | <u>Yes</u><br><i> </i> | <u>Yes</u><br><i>Yes</i> | <u>Yes</u><br><i>Yes</i> | <u>Yes</u><br><i>Yes</i> | <u>Yes</u><br><i>Yes</i> | | Chroma Siting | <u>Full-Feature</u><br><i>Free-Kernel</i> | <br><i> </i> | <u>Yes</u><br><i> </i> | <u>Yes</u><br><i> </i> | <u>Yes</u><br><i> </i> | <u>Yes</u><br><i>Yes</i> | <u>Yes</u><br><i>Yes</i> | <u>Yes</u><br><i>Yes</i> | <u>Yes</u><br><i>Yes</i> | | HDR10 Tone Mapping | <u>Full-Feature</u><br><i>Free-Kernel</i> | <br><i> </i> | <br><i> </i> | <br><i> </i> | <br><i> </i> | <u>Yes</u><br><i> </i> | <u>No</u><br><i> </i> | <u>Yes</u><br><i> </i> | <u>Yes</u><br><i> </i> | \* EHL/JSL only support BOB DI For more feature information, please refer to [Supported video processing csc/scaling format](https://github.com/intel/media-driver/blob/master/docs/media_features.md#supported-video-processing-cscscaling-format) ### Build Options Media-driver supports few build types as described below. You could refer to the following settings to enable them. * **Full Feature Build**: ENABLE_KERNELS=ON(Default) ENABLE_NONFREE_KERNELS=ON(Default) * **Free Kernel Build**: ENABLE_KERNELS=ON ENABLE_NONFREE_KERNELS=OFF * If trying to use pre-built open source kernel binaries, please add BUILD_KERNELS=OFF(Default). * If trying to rebuild open source kernel from source code, please add BUILD_KERNELS=ON. Media-driver requires special i915 kernel mode driver (kmd) version to support the following new platforms since upstream version of i915 kmd does not fully support them (pending patches upstream): * DG1 * SG1 By default, media-driver builds against upstream i915 kmd and will miss support for the platforms listed above. To enable new platforms which require special i915 kmd specify `ENABLE_PRODUCTION_KMD=ON` (default: `OFF`) build configuration option. ## Known Issues and Limitations 1. Intel(R) Media Driver for VAAPI is recommended to be built against gcc compiler v6.1 or later, which officially supported C++11. 2. SKL: Green or other incorrect color will be observed in output frames when using YV12/I420 as input format for csc/scaling/blending/rotation, etc. on Ubuntu 16.04 stock (with kernel 4.10). The issue can be addressed with the kernel patch: [WaEnableYV12BugFixInHalfSliceChicken7](https://cgit.freedesktop.org/drm-tip/commit/?id=0b71cea29fc29bbd8e9dd9c641fee6bd75f68274) 3. HuC firmware is necessary for AVC/HEVC/VP9 low power encoding bitrate control, including CBR, VBR, etc. As of now, HuC firmware support is disabled in Linux kernels by default. kernel command line option "i915.enable_guc=2" for HuC loading can be set e.g. by doing echo "options i915 enable_guc=2" > /etc/modprobe.d/i915.conf (as root). Mind that HuC firmware support presents in the following kernels for the specified platforms: * APL/KBL: starting from kernel 4.11 * CFL: starting from kernel 4.15 * ICL: starting from kernel 5.2 * EHL/JSL: starting from kernel 5.8 * TGL: starting from kernel 5.9 * RKL: [drm-tip](https://cgit.freedesktop.org/drm-tip) ##### (*) Other names and brands may be claimed as property of others. |
Commit History @upstream/21.3.3+dfsg1
0
»»
- New upstream version 20.4.3+dfsg1 Sebastian Ramacher 3 years ago
- New upstream version 20.4.2+dfsg1 Sebastian Ramacher 3 years ago
- New upstream version 20.4.1+dfsg1 Sebastian Ramacher 3 years ago
- New upstream version 20.3.0+dfsg1 Sebastian Ramacher 3 years ago
- New upstream version 20.2.0+dfsg1 Sebastian Ramacher 3 years ago
- New upstream version 20.1.1+dfsg1 Sebastian Ramacher 4 years ago
- New upstream version 20.1.1+dfsg1 Sebastian Ramacher 4 years ago
- New upstream version 19.4.1+dfsg1 Sebastian Ramacher 4 years ago
- New upstream version 19.4.0r+dfsg1 Sebastian Ramacher 4 years ago
- New upstream version 19.3.1+dfsg1 Sebastian Ramacher 4 years ago
- New upstream version 19.3.0+dfsg1 Sebastian Ramacher 4 years ago
- New upstream version 19.2.1+dfsg1 Sebastian Ramacher 4 years ago
- New upstream version 19.2.0+dfsg1 Sebastian Ramacher 4 years ago
- New upstream version 19.2.0+dfsg1 Sebastian Ramacher 4 years ago
- New upstream version 18.4.1+dfsg1 Sebastian Ramacher 5 years ago
- New upstream version 18.4.0+dfsg1 Sebastian Ramacher 5 years ago
- Import Upstream version 18.3.0+dfsg1 Sebastian Ramacher 5 years ago
0
»»