avfilter: add a blend_vulkan filter

Multimedia / FFmpeg - Wu Jianhua [intel.com] - 5 January 2022 14:16 UTC

This commit adds a blend_vulkan filter and a normal blend mode, and reserves support for introducing the blend modes in the future.

Use the commands below to test: (href: https://trac.ffmpeg.org/wiki/Blend) I. make an image for test ffmpeg -f lavfi -i color=s=256x256,geq=r='H-1-Y':g='H-1-Y':b='H-1-Y' -frames 1 \-y -pix_fmt yuv420p test.jpg

II. blend in sw ffmpeg -i test.jpg -vf "split[a][b];[b]transpose[b];[a][b]blend=all_mode=normal,\ pseudocolor=preset=turbo" -y normal_sw.jpg

III. blend in vulkan ffmpeg -init_hw_device vulkan -i test.jpg -vf "split[a][b];[b]transpose[b];\ [a]hwupload[a];[b]hwupload[b];[a][b]blend_vulkan=all_mode=normal,hwdownload,\ format=yuv420p,pseudocolor=preset=turbo" -y normal_vulkan.jpg

9a194252c7 avfilter: add a blend_vulkan filter
configure | 1 +
libavfilter/Makefile | 1 +
libavfilter/allfilters.c | 1 +
libavfilter/vf_blend_vulkan.c | 499 ++++++++++++++++++++++++++++++++++++++++++
4 files changed, 502 insertions(+)

  • Share