[FFmpeg-devel] [PATCH] hwcontext_opencl: choose the first device if multiple devices are available

Mark Thompson sw at jkqxz.net
Mon Jan 22 22:32:12 EET 2024


On 17/01/2024 07:36, Xiang, Haihao wrote:
> From: Haihao Xiang <haihao.xiang at intel.com>
> 
> This makes '-init_hw_device opencl' work in a multiple-device system.

Under what circumstances is this more useful than the existing behaviour which prompts the user to select the device they intend?

There is no particular ordering to devices, the first one is just random.  Having your process fail with an opaque message (because the device picked lacks some operation) or run many times slower than expected (because the smallest device happened to be first in the list) or do something different on a machine which looks the same (because it has an extra driver for something else) rather than just saying up front that there are multiple devices and the user needs to pick seems worse to me, since it is much harder to see where the problem is.

Thanks,

- Mark


More information about the ffmpeg-devel mailing list