[FFmpeg-devel] [PATCH] configure: autodetect OpenCL headers and ICD loader

Hendrik Leppkes h.leppkes at gmail.com
Mon Jun 8 09:30:20 CEST 2015


On Mon, Jun 8, 2015 at 5:53 AM, Gupta, Maneesh <Maneesh.Gupta at amd.com> wrote:
>> -----Original Message-----
>> From: ffmpeg-devel-bounces at ffmpeg.org [mailto:ffmpeg-devel-
>> bounces at ffmpeg.org] On Behalf Of James Almer
>> Sent: Thursday, May 28, 2015 10:06 AM
>> To: FFmpeg development discussions and patches
>> Subject: Re: [FFmpeg-devel] [PATCH] configure: autodetect OpenCL headers
>> and ICD loader
>>
>> On 28/05/15 12:28 AM, Gupta, Maneesh wrote:
>> > Attached is a patch that enables configure to autodetect the presence of
>> OpenCL headers and ICD loader. If the necessary headers are found, the
>> OpenCL infrastructure compilation is enabled as well. Note that this does not
>> modify the runtime behavior in any way. Execution of the OpenCL code path
>> still requires the user to explicitly enable it.
>> >
>> > Please review the patch and share your comments on the same.
>> >
>> > - Maneesh
>>
>> I personally don't agree OpenCL should be autodetected.
>>
>> Currently, only the so called "system" libs are autodetected (zlib, iconv,
>> pthreads, the like). Open*L, decoding/encoding libraries, and other
>> miscellaneous libraries are enabled only if explicitly requested.
>> If we enable one by default, then there's no argument against enabling
>> every other as well ("Why this one but not that other one?"), and suddenly
>> default builds become bloated and automated scripts get potentially broken
>> until adapted.
>>
>> Lets keep default builds as lightweight as possible, and allow people to
>> explicitly enable the functionality they require.
>
> [Gupta, Maneesh] Apologize for the delayed response. However grep'ing the string "autodetect" in the configure script throws up several "non-system" libs including D3D11VA, DXVA2, VAAPI, VDA, VDPAU, sdl. Why are they turned on by default? Several of these non-system libs enable use of hardware acceleration. OpenCL is similar in nature with a key difference that it is more platform/OS agnostic and can run on both CPU as well as GPU.

Most of those don't link against any library, ie. like DXVA2, it
doesn't add any extra link dependencies which are not system
libraries, so the resulting build is still perfectly portable.
For the few exceptions that do add link deps, we suffer for that
enough, we don't need any more "exceptions".

- Hendrik


More information about the ffmpeg-devel mailing list