X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavfilter%2Fopencl.h;h=c0a45197853bcbc6260cad8e4804950143b12700;hb=4e1307c0f76d015941a1217bcd44a20f25e04fad;hp=4d740c18abaec0807d8db1de147086fde0a07227;hpb=0cc8e34a94c84132cf5b0f6472c5f61c8a66cee1;p=ffmpeg diff --git a/libavfilter/opencl.h b/libavfilter/opencl.h index 4d740c18aba..c0a45197853 100644 --- a/libavfilter/opencl.h +++ b/libavfilter/opencl.h @@ -19,6 +19,12 @@ #ifndef AVFILTER_OPENCL_H #define AVFILTER_OPENCL_H +// The intended target is OpenCL 1.2, so disable warnings for APIs +// deprecated after that. This primarily applies to clCreateCommandQueue(), +// we can't use the replacement clCreateCommandQueueWithProperties() because +// it was introduced in OpenCL 2.0. +#define CL_USE_DEPRECATED_OPENCL_1_2_APIS + #include "libavutil/buffer.h" #include "libavutil/hwcontext.h" #include "libavutil/hwcontext_opencl.h" @@ -84,4 +90,12 @@ int ff_opencl_filter_load_program(AVFilterContext *avctx, int ff_opencl_filter_load_program_from_file(AVFilterContext *avctx, const char *filename); +/** + * Find the work size needed needed for a given plane of an image. + */ +int ff_opencl_filter_work_size_from_image(AVFilterContext *avctx, + size_t *work_size, + AVFrame *frame, int plane, + int block_alignment); + #endif /* AVFILTER_OPENCL_H */