]> git.sesse.net Git - ffmpeg/commit - libavutil/hwcontext_vulkan.c
avutils/vulkan: hwmap, respect src frame resolution
authorXu Guangxin <guangxin.xu@intel.com>
Thu, 21 Jan 2021 04:35:13 +0000 (12:35 +0800)
committerLynne <dev@lynne.ee>
Fri, 22 Jan 2021 03:30:42 +0000 (04:30 +0100)
commitae97f69ce1032f96e361c0622355ac15cf7f9029
tree9ee3757b0b9e082c1cde194c3910fac9a52f71bf
parentc6a3ca2db491a66af9b1f5b12cbe3058713caf0b
avutils/vulkan: hwmap, respect src frame resolution

fixes http://trac.ffmpeg.org/ticket/9055

The hw decoder may allocate a large frame from AVHWFramesContext, and adjust width and height based on bitstream.
We need to use resolution from src frame instead of AVHWFramesContext.

test command:
ffmpeg -loglevel debug -hide_banner -hwaccel vaapi -init_hw_device vaapi=va:/dev/dri/renderD128 -hwaccel_device va -hwaccel_output_format vaapi -init_hw_device vulkan=vulk -filter_hw_device vulk -i 1920x1080.264 -c:v libx264 -r:v 30 -profile:v high -preset veryfast -vf "hwmap,chromaber_vulkan=0:0,hwdownload,format=nv12" -map 0 -y vaapiouts.mkv

expected:
No green bar at bottom.
libavutil/hwcontext_vulkan.c