[FFmpeg-devel] [PATCH V6 5/5] libavutil/hwcontext_vulkan: specify the modifier to create VKImage

Lynne dev at lynne.ee
Fri Dec 10 18:11:33 EET 2021


7 Dec 2021, 10:05 by wenbin.chen at intel.com:

> When vulkan image exports to drm, the tilling need to be
> VK_IMAGE_TILING_DRM_FORMAT_MODIFIER_EXT. Now add code to create vulkan
> image using this format.
>
> Now the following command line works:
>
> ffmpeg -hwaccel vaapi -hwaccel_device /dev/dri/renderD128 -hwaccel_output_format \
> vaapi -i input_1080p.264 -vf "hwmap=derive_device=vulkan,format=vulkan, \
> scale_vulkan=1920:1080,hwmap=derive_device=vaapi,format=vaapi" -c:v h264_vaapi output.264
>
> Signed-off-by: Wenbin Chen <wenbin.chen at intel.com>
> ---
>  libavutil/hwcontext_vulkan.c | 133 +++++++++++++++++++++++++++++++++--
>  1 file changed, 127 insertions(+), 6 deletions(-)
>

Pushed the patchset, along with the transpose filter.
Tested on all 3 vendors, works fine. AMD requires
dedicated allocation, for which I added an error condition.

The code was quite ugly in quite a lot of places,
so I did touch mostly every line of it in some way.

Please fix your quirky, limited hardware next time.


More information about the ffmpeg-devel mailing list