[FFmpeg-devel] [PATCH 4/5] libavutil: add platform_idx and device_idx introductions

Stefano Sabatini stefasab at gmail.com
Thu Apr 4 20:08:04 CEST 2013


On date Thursday 2013-04-04 20:33:07 +0800, Wei Gao encoded:
> 

Note: mention opencl in the patch subject:
lavu/opencl: introduce platform_idx and device_idx options

> From a2ec1e682035c94bfff342f22198654ada04167e Mon Sep 17 00:00:00 2001
> From: highgod0401 <highgod0401 at gmail.com>
> Date: Thu, 4 Apr 2013 20:23:30 +0800
> Subject: [PATCH 4/5] add  platform_idx and device_idx introductions
> 
> ---
>  libavutil/opencl.h | 12 ++++++++++--
>  1 file changed, 10 insertions(+), 2 deletions(-)
> 
> diff --git a/libavutil/opencl.h b/libavutil/opencl.h
> index 6ebde10..87e7181 100644
> --- a/libavutil/opencl.h
> +++ b/libavutil/opencl.h
> @@ -87,15 +87,23 @@ int av_opencl_register_kernel_code(const char *kernel_code);
>   * Initialize the run time OpenCL environment and compile the kernel
>   * code registered with av_opencl_register_kernel_code().
>   *
> - * Currently, the only accepted option is "build_options", used to set
> - * options to compile registered kernels code. See reference "OpenCL

It accepts the following options:
- build_options: set options to compile registered kernels code
- platform_idx: set the index of the OpenCL platform to use
- device_idx: set the index of the OpenCL device to use

See reference "OpenCL Specification Version: 1.2 chapter 5.6.4".

> + * Currently, the only accepted option are "build_options", "platform_idx", "device_idx" used to set
> + *
> + * build_options:options to compile registered kernels code. See reference "OpenCL
>   * Specification Version: 1.2 chapter 5.6.4".
>   *
> + * platform_idx: the index of platform_ids in platform list.
> + *
> + * device_idx: the index of devices in device list.

Regarding this ones, how is the user supposed to get the list of
supported platform/device indexes?

How is possible to list the currently supported platforms/devices?

> + *
> + *
>   * @param options        dictionary of key/value options
> + *

spurious

>   * @param ext_opencl_env external OpenCL environment, created by an
>   *                       application program, ignored if set to NULL
>   * @return >=0 on success, a negative error code in case of failure
>   */
> +

spurious

>   int av_opencl_init(AVDictionary *options, AVOpenCLExternalEnv *ext_opencl_env);
>  
>  /**
> -- 
> 1.7.11.msysgit.1
-- 
FFmpeg = Fundamentalist & Forgiving MultiPurpose EnGine


More information about the ffmpeg-devel mailing list