[FFmpeg-devel] [PATCH 2/2] avfilter: add a vflip_vulkan filter

Lynne dev at lynne.ee
Wed Nov 17 14:42:55 EET 2021


Nov 17, 2021, 08:51 by jianhua.wu at intel.com:

> The following command is on how to apply vflip_vulkan filter:
>
> ffmpeg -init_hw_device vulkan -i input.264 -vf hwupload=extra_hw_frames=16,vflip_vulkan,hwdownload,format=yuv420p output.264
>
> Signed-off-by: Wu Jianhua <jianhua.wu at intel.com>
> ---
>  configure                     |   1 +
>  libavfilter/Makefile          |   1 +
>  libavfilter/allfilters.c      |   1 +
>  libavfilter/vf_vflip_vulkan.c | 277 ++++++++++++++++++++++++++++++++++
>  4 files changed, 280 insertions(+)
>  create mode 100644 libavfilter/vf_vflip_vulkan.c
>

The only difference between this and hflp_vulkan.c is a one-line
change in a shader. Could you merge the filters together?
Just add a flag to the init function and filter frame function,
and add separate hflip and vflip filter frame functions which
call the wrapped filter frame function with a different argument.
As for the name, I think vf_flip_vulkan.c would do.


More information about the ffmpeg-devel mailing list