[FFmpeg-devel] [PATCH 10/14] lavfi: Add filter to run an arbitrary OpenCL program on frames
Mark Thompson
sw at jkqxz.net
Tue Sep 12 00:46:13 EEST 2017
On 11/09/17 22:04, Michael Niedermayer wrote:
> On Sun, Sep 10, 2017 at 09:53:34PM +0100, Mark Thompson wrote:
>> ---
>> See example in first mail.
>>
>>
> [...]
>> +static av_cold void program_opencl_uninit(AVFilterContext *avctx)
>> +{
>> + ProgramOpenCLContext *ctx = avctx->priv;
>> + cl_int cle;
>> +
>> + if (ctx->kernel) {
>> + cle = clReleaseKernel(ctx->kernel);
>> + if (cle != CL_SUCCESS)
>> + av_log(avctx, AV_LOG_ERROR, "Failed to release "
>> + "kernel: %d.\n", cle);
>> + }
>> +
>> + if (ctx->command_queue) {
>> + cle = clReleaseCommandQueue(ctx->command_queue);
>> + if (cle != CL_SUCCESS)
>> + av_log(avctx, AV_LOG_ERROR, "Failed to release "
>> + "command queue: %d.\n", cle);
>> + }
>> +
>> + ff_opencl_filter_uninit(avctx);
>> +}
>> +
>> +#define OFFSET(x) offsetof(ProgramOpenCLContext, x)
>
>> +#define FLAGS (AV_OPT_FLAG_VIDEO_PARAM)
>
> this probably should be
> AV_OPT_FLAG_FILTERING_PARAM|AV_OPT_FLAG_VIDEO_PARAM
Yep, and also in the overlay filter. Fixed.
Thanks,
- Mark
More information about the ffmpeg-devel
mailing list