19 #ifndef AVFILTER_OPENCL_H
20 #define AVFILTER_OPENCL_H
26 #define CL_USE_DEPRECATED_OPENCL_1_2_APIS
55 #define CL_SET_KERNEL_ARG(kernel, arg_num, type, arg) \
56 cle = clSetKernelArg(kernel, arg_num, sizeof(type), arg); \
57 if (cle != CL_SUCCESS) { \
58 av_log(avctx, AV_LOG_ERROR, "Failed to set kernel " \
59 "argument %d: error %d.\n", arg_num, cle); \
68 #define CL_FAIL_ON_ERROR(errcode, ...) do { \
69 if (cle != CL_SUCCESS) { \
70 av_log(avctx, AV_LOG_ERROR, __VA_ARGS__); \
109 const char **program_source_array,
118 const char *filename);
126 int block_alignment);
This struct aggregates all the (hardware/vendor-specific) "high-level" state, i.e.
API-specific header for AV_HWDEVICE_TYPE_OPENCL.
This structure describes decoded (raw) audio or video data.
Main libavfilter public API header.
int ff_opencl_filter_work_size_from_image(AVFilterContext *avctx, size_t *work_size, AVFrame *frame, int plane, int block_alignment)
Find the work size needed needed for a given plane of an image.
AVOpenCLDeviceContext * hwctx
AVHWDeviceContext * device
int ff_opencl_filter_load_program(AVFilterContext *avctx, const char **program_source_array, int nb_strings)
Load a new OpenCL program from strings in memory.
A link between two filters.
void ff_opencl_filter_uninit(AVFilterContext *avctx)
Uninitialise an OpenCL filter context.
int ff_opencl_filter_load_program_from_file(AVFilterContext *avctx, const char *filename)
Load a new OpenCL program from a file.
int ff_opencl_filter_config_output(AVFilterLink *outlink)
Create a suitable hardware frames context for the output.
enum AVPixelFormat output_format
int ff_opencl_filter_init(AVFilterContext *avctx)
Initialise an OpenCL filter context.
Describe the class of an AVClass context structure.
refcounted data buffer API
A reference to a data buffer.
int ff_opencl_filter_query_formats(AVFilterContext *avctx)
Return that all inputs and outputs support only AV_PIX_FMT_OPENCL.
int ff_opencl_filter_config_input(AVFilterLink *inlink)
Check that the input link contains a suitable hardware frames context and extract the device from it...
AVPixelFormat
Pixel format.