[FFmpeg-devel] [PATCH]opencl: automatically select the fastest opencl device
stefasab at gmail.com
Fri Dec 6 23:37:25 CET 2013
On date Friday 2013-12-06 14:35:19 -0600, Lenny Wang encoded:
> On Fri, Dec 6, 2013 at 4:57 AM, Stefano Sabatini <stefasab at gmail.com> wrote:
> > Uh, not yet.
> > So, Michael suggested to move all cmdutils OpenCL code to a separate
> > file. The tools directory is meant for self-contained tools, you
> > should not depend on ff*/cmdutils code or even worse make ff*/cmdutils
> > code depend on it.
> > So I suggest this: you move all cmdutils OpenCL code to
> > cmdutils_opencl.c/h. cmdutils_opencl.o will be linked only if OpenCL
> > is detected. The opencl_options code should go in the same file as
> > well (in the same or maybe in a separate follow-up patch).
> > Function prototypes can go to a dedicated cmdutils_opencl.h file or
> > stay in cmdutils.h, under #ifdef, as Michael prefers.
> Fixed based on Stefano's suggestion.
> From: Lenny Wang <lwanghpc at gmail.com>
> Date: Fri, 6 Dec 2013 14:20:00 -0600
> Subject: [PATCH] cmdutils & opencl: add cmdutils_opencl.c with new -opencl_bench option
> Makefile | 1 +
> cmdutils.c | 24 ----
> cmdutils.h | 4 +
> cmdutils_common_opts.h | 1 +
> cmdutils_opencl.c | 274 +++++++++++++++++++++++++++++++++++++++++++
> doc/APIchanges | 2 +
> doc/fftools-common-opts.texi | 4 +
> doc/utils.texi | 4 +-
> libavutil/opencl.c | 42 +++++++
> libavutil/opencl.h | 16 +++
> 10 files changed, 346 insertions(+), 26 deletions(-)
FFmpeg = Fantastic Faithful Mind-dumbing Pitiless Enhancing Generator
More information about the ffmpeg-devel