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

2015-06-08 Thread Hendrik Leppkes
On Mon, Jun 8, 2015 at 5:53 AM, Gupta, Maneesh maneesh.gu...@amd.com wrote:
 -Original Message-
 From: ffmpeg-devel-boun...@ffmpeg.org [mailto:ffmpeg-devel-
 boun...@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
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


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

2015-06-08 Thread Gupta, Maneesh
 -Original Message-
 From: ffmpeg-devel-boun...@ffmpeg.org [mailto:ffmpeg-devel-
 boun...@ffmpeg.org] On Behalf Of Hendrik Leppkes
 Sent: Monday, June 08, 2015 1:00 PM
 To: FFmpeg development discussions and patches
 Subject: Re: [FFmpeg-devel] [PATCH] configure: autodetect OpenCL headers
 and ICD loader
 
 On Mon, Jun 8, 2015 at 5:53 AM, Gupta, Maneesh
 maneesh.gu...@amd.com wrote:
  -Original Message-
  From: ffmpeg-devel-boun...@ffmpeg.org [mailto:ffmpeg-devel-
  boun...@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

[Gupta, Maneesh] The OpenCL code only links against the ICD loader. Also x264 
enables OpenCL code by default and the build is perfectly portable as far as I 
have seen. I don't see how that is not possible in the case of ffmpeg.
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


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

2015-06-07 Thread Gupta, Maneesh
 -Original Message-
 From: ffmpeg-devel-boun...@ffmpeg.org [mailto:ffmpeg-devel-
 boun...@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.
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


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

2015-05-27 Thread James Almer
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.
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


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

2015-05-27 Thread Wei Gao
2015-05-28 11:28 GMT+08:00 Gupta, Maneesh maneesh.gu...@amd.com:

 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.

Hi

I have review the code, and merge the patch for testing, it can auto detect
the OpenCL configuration.
It looks good to me.

Thanks
Best regards


 - Maneesh

 ___
 ffmpeg-devel mailing list
 ffmpeg-devel@ffmpeg.org
 http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel