[FFmpeg-devel] [PATCH]opencl: automatically select the fastest opencl device
Stefano Sabatini
stefasab at gmail.com
Thu Nov 21 13:40:32 CET 2013
On date Thursday 2013-11-21 06:05:19 -0600, Lenny Wang encoded:
> Hi,
>
> Use -opencl_options device_idx=-1 or platform_idx=-1 to enable
> automatic opencl device selection.
>
> There are usually more than a couple (CPU, iGPU, dGPU) opencl capable
> devices present in a mainstream platform. We wanted something less
> heuristic and effective in ffmpeg with automatic opencl device
> selection. This is achieved by running a small representative
> workload (unsharp) across all available devices, and the one with the
> shortest processing time will be picked. The entire benchmark only
> takes a few seconds to execute.
I don't think it is acceptable to call libavfilter (or any other
library) from libavutil.
If you need to select the fastest device, you could add a dedicated
tool (e.g. ffmpeg/tools/opencl-find-fastest-device), but this should
not be part of the library.
--
FFmpeg = Foolish & Fanciful Merciful Programmable Exploitable Gorilla
More information about the ffmpeg-devel
mailing list