AMD VAAPI HEVC encoding not working correctly on Polaris
E.g. do
ffmpeg -hwaccel vaapi -hwaccel_device /dev/dri/renderD128 -hwaccel_output_format vaapi -ss 15 -i input.mp4 -t 15 -c:v hevc_vaapi -global_quality 15 -c:a copy -map 0 output.mkv
Lets ffmpeg output
[hevc_vaapi @ 0x555ebcf869c0] Driver does not support some wanted packed headers (wanted 0xd, found 0).
[hevc_vaapi @ 0x555ebcf869c0] Driver does not support packed sequence headers, but a global header is requested.
[hevc_vaapi @ 0x555ebcf869c0] No global header will be written: this may result in a stream which is not usable for some purposes (e.g. not muxable to some containers).
There is a garbled line at the bottom of the video output:
This line is not there when running the same conversion on Intel GPU (it also shows no errors in ffmpeg log):
Originally reported this as a kernel bug, but it's probably user space: drm/amd#689 (closed)
H.264 encoding on Polaris doesn't show the garbled line.
RX 570
recent mesa 20-git
linux 5.5-rc6