[FFmpeg-devel] [PATCH] lavfi: add colorkey_opencl filter

Cld fire cldfire3 at gmail.com
Thu Apr 11 05:22:23 EEST 2019


On Wed, Apr 10, 2019 at 4:30 PM Carl Eugen Hoyos <ceffmpeg at gmail.com> wrote:

> 2019-04-10 5:37 GMT+02:00, Jarek Samic <cldfire3 at gmail.com>:
>
> > +        // Make sure the input is a format we support
> > +        if (fmt != AV_PIX_FMT_ARGB &&
> > +            fmt != AV_PIX_FMT_RGBA &&
> > +            fmt != AV_PIX_FMT_ABGR &&
> > +            fmt != AV_PIX_FMT_BGRA &&
> > +            fmt != AV_PIX_FMT_NONE
> > +        ) {
> > +            av_log(avctx, AV_LOG_ERROR, "unsupported (non-RGB) format in
> > colorkey_opencl.\n");
> > +            err = AVERROR(ENOSYS);
> > +            goto fail;
> > +        }
>
> I would have expected that you export a list of supported
> pix_fmts and that you can assert on the actual format being
> one of them (if you need to).
>

 Hmm, would you be able to clarify what you mean by that? The code above is
modeled after
code from the tonemap_opencl filter, lines 398-402:

if (input_frames_ctx->sw_format != AV_PIX_FMT_P010) {
    av_log(ctx, AV_LOG_ERROR, "unsupported format in tonemap_opencl.\n");
    err = AVERROR(ENOSYS);
    goto fail;
}


More information about the ffmpeg-devel mailing list