[FFmpeg-devel] [PATCH] libavfilter: unsharpen opencl filter optimizations

Michael Niedermayer michaelni at gmx.at
Fri Dec 19 15:01:01 CET 2014


On Thu, Dec 18, 2014 at 07:24:27PM +0000, Titov, Alexey wrote:
> Hi Michael,
> 
> Here is the patch. I attached a zip of this patch in the last email, but it was probably stripped off.
> Let me know how I can help.
> =======================================
[...]
> diff --git a/libavutil/opencl.c b/libavutil/opencl.c
> index 36cb6fe..738d0db 100644
> --- a/libavutil/opencl.c
> +++ b/libavutil/opencl.c
> @@ -450,7 +450,24 @@ cl_program av_opencl_compile(const char *program_name, const char *build_opts)
>      status = clBuildProgram(program, 1, &(opencl_ctx.device_id), build_opts, NULL, NULL);
>      if (status != CL_SUCCESS) {
>          av_log(&opencl_ctx, AV_LOG_ERROR,
> -               "Compilation failed with OpenCL program: %s\n", program_name);
> +            "Compilation failed with OpenCL program: '%s' with error %d \n", program_name, status);
> +
> +        // Determine the size of the log

> +        size_t log_size;

mixing declaration and statement


> +        clGetProgramBuildInfo(program, &(opencl_ctx.device_id), CL_PROGRAM_BUILD_LOG, 0, NULL, &log_size);
> +
> +        // Allocate memory for the log

> +        char *log = (char *) malloc(log_size+1);

unneeded cast and should probably be av_malloc()


[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

The misfortune of the wise is better than the prosperity of the fool.
-- Epicurus
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20141219/5f3f7d13/attachment.asc>


More information about the ffmpeg-devel mailing list