[FFmpeg-devel] [PATCH] lavfi: add a libplacebo filter
Nicolas George
george at nsup.org
Tue Mar 9 19:53:43 EET 2021
Niklas Haas (12021-03-09):
> From: Niklas Haas <git at haasn.xyz>
>
> This filter conceptually maps the libplacebo `pl_renderer` API into
> libavfilter, which is a high-level image rendering API designed to work
> with an RGB pipeline internally. As such, there's no way to avoid e.g.
> chroma interpolation with this filter, although new versions of
> libplacebo support outputting back to subsampled YCbCr after processing
> is done.
>
> That being said, `pl_renderer` supports automatic integration of the
> majority of libplacebo's shaders, ranging from debanding to tone
> mapping, and also supports loading custom mpv-style user shaders, making
> this API a natural candidate for getting a lot of functionality out of
> relatively little code.
>
> In the future, I may approach this problem either by rewriting this
> filter to also support a non-renderer codepath, or by upgrading
> libplacebo's renderer to support a full YCbCr pipeline.
>
> It's worth noting that this filter could be extended in the future to
> support HWframes frames of type AV_PIX_FMT_VULKAN, but this is not
> currently possible due to API limitations in the vulkan hwaccel.
> (Although it's also worth pointing out that, apart from a single
> `pl_vulkan_create` call, the current `vf_libplacebo` code does not
> depend on vulkan at all - so in theory it could be extended to support
> OpenGL or other libplacebo backends)
> ---
> configure | 3 +
> libavfilter/Makefile | 1 +
> libavfilter/allfilters.c | 1 +
> libavfilter/vf_libplacebo.c | 627 ++++++++++++++++++++++++++++++++++++
> 4 files changed, 632 insertions(+)
> create mode 100644 libavfilter/vf_libplacebo.c
Thanks for the patch. I have not yet looked at the code itself.
Please include some documentation, it would be helpful even for
reviewing.
Regards,
--
Nicolas George
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20210309/269705e9/attachment.sig>
More information about the ffmpeg-devel
mailing list