| 182 | | [https://www.khronos.org/opencl/ OpenCL] is currently only used for filtering (deshake and unsharp filters). In order to use OpenCL code you need to enable the build with {{{--enable-opencl}}}. An API to use OpenCL API from FFmpeg is provided in `libavutil/opencl.h`. No decoding/encoding is currently supported (yet). |
| 183 | | |
| 184 | | For enable-opencl to work you need to basically install your local graphics cards drivers, as well as SDK, then use its .lib files and headers. |
| | 182 | [https://www.khronos.org/opencl/ OpenCL] can be used for a number of filters. To build, OpenCL 1.2 or later headers are required, along with an ICD or ICD loader to link to - it is recommended (but not required) to link with the ICD loader, so that the implementation can be chosen at run-time rather than build-time. At run-time, an OpenCL 1.2 driver is required - most GPU manufacturers will provide one as part of their standard drivers. CPU implementations are also usable, but may be slower than using native filters in ffmpeg directly. |
| | 183 | |
| | 184 | OpenCL can interoperate with other GPU APIs to avoid redundant copies between GPU and CPU memory. The supported methods are: |
| | 185 | * DXVA2: NV12 surfaces only, all platforms. |
| | 186 | * D3D11: NV12 textures on Intel only. |
| | 187 | * VAAPI: all surface types. |
| | 188 | * ARM Mali: all surface types, via DRM object sharing. |
| | 189 | * libmfx: NV12 surfaces only, via VAAPI or DXVA2. |