X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavfilter%2Fvf_program_opencl.c;fp=libavfilter%2Fvf_program_opencl.c;h=0bcf188ac799b213d6617c1f6ec4c09e38ee8d3e;hb=2a1542d105dc3161516e34eef77bcd64aa72cab4;hp=4ee9668236c246f35cb131da604630ce79863c8b;hpb=b78d55b2e63e410abe744932fda9358633743a9e;p=ffmpeg diff --git a/libavfilter/vf_program_opencl.c b/libavfilter/vf_program_opencl.c index 4ee9668236c..0bcf188ac79 100644 --- a/libavfilter/vf_program_opencl.c +++ b/libavfilter/vf_program_opencl.c @@ -142,10 +142,10 @@ static int program_opencl_run(AVFilterContext *avctx) } } - cle = clGetImageInfo(dst, CL_IMAGE_WIDTH, sizeof(size_t), - &global_work[0], NULL); - cle = clGetImageInfo(dst, CL_IMAGE_HEIGHT, sizeof(size_t), - &global_work[1], NULL); + err = ff_opencl_filter_work_size_from_image(avctx, global_work, + output, plane, 0); + if (err < 0) + goto fail; av_log(avctx, AV_LOG_DEBUG, "Run kernel on plane %d " "(%zux%zu).\n", plane, global_work[0], global_work[1]);