FFmpeg 5.1.6
Since* 4.3
#

Filter video using an OpenCL program.

source

OpenCL program source file.

kernel

Kernel name in program.

inputs

Number of inputs to the filter. Defaults to 1.

size, s

Size of output frames. Defaults to the same as the first input.

The program_opencl filter also supports the framesync options.

The program source file must contain a kernel function with the given name, which will be run once for each plane of the output. Each run on a plane gets enqueued as a separate 2D global NDRange with one work-item for each pixel to be generated. The global ID offset for each work-item is therefore the coordinates of a pixel in the destination image.

The kernel function needs to take the following arguments:

Example programs: