[FFmpeg-devel] [PATCH]opencl: automatically select the fastest opencl device

Michael Niedermayer michaelni at gmx.at
Sat Nov 23 20:13:41 CET 2013


On Sat, Nov 23, 2013 at 07:58:40PM +0100, Stefano Sabatini wrote:
> On date Friday 2013-11-22 12:53:38 -0600, Lenny Wang encoded:
> > On Fri, Nov 22, 2013 at 4:42 AM, Lenny Wang <lenny at multicorewareinc.com> wrote:
> [...]
[...]
> >      { "opencl_options", HAS_ARG, {.func_arg = opt_opencl},      "set OpenCL environment options" },
> >  #endif
> > diff --git a/libavutil/opencl.c b/libavutil/opencl.c
> > index ae4c476..8654c25 100644
> > --- a/libavutil/opencl.c
> > +++ b/libavutil/opencl.c
> > @@ -98,7 +98,7 @@ static const AVClass openclutils_class = {
> >  
> >  static OpenclContext opencl_ctx = {&openclutils_class};
> >  
> > -static const cl_device_type device_type[] = {CL_DEVICE_TYPE_GPU, CL_DEVICE_TYPE_CPU, CL_DEVICE_TYPE_DEFAULT};
> > +static const cl_device_type device_type[] = {CL_DEVICE_TYPE_GPU, CL_DEVICE_TYPE_CPU};
> 
> Unrelated?
> 
> [...]
> 
> I'm fine with the overall design if Michael (cmdutils.c maintainer) is
> OK with it. As alternative solution, a dedicated tool may do.

it should at least be in a seperate file, cmdutils.c is not the correct
place for opencl benchmarking code

[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

No great genius has ever existed without some touch of madness. -- Aristotle
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20131123/d40c7be1/attachment.asc>


More information about the ffmpeg-devel mailing list