[FFmpeg-devel] [PATCH 10/14] lavfi: Add filter to run an arbitrary OpenCL program on frames

Michael Niedermayer michael at niedermayer.cc
Tue Sep 12 00:04:38 EEST 2017


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

[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

The worst form of inequality is to try to make unequal things equal.
-- Aristotle
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20170911/23ec227c/attachment.sig>


More information about the ffmpeg-devel mailing list