]> git.sesse.net Git - ffmpeg/commit
lavu/qsv: make a copy as libmfx alignment requirement for uploading
authorZhong Li <zhong.li@intel.com>
Mon, 17 Sep 2018 11:16:44 +0000 (19:16 +0800)
committerZhong Li <zhong.li@intel.com>
Thu, 11 Oct 2018 05:26:59 +0000 (13:26 +0800)
commit681aa7d14f97fd98181ca6d61e11be48fe65692d
tree9254282b2ac8c7de0acddee9e49932c5291224f2
parenta5e1cb9e96bca091ed7103d8be72a99e7dc31582
lavu/qsv: make a copy as libmfx alignment requirement for uploading

Libmfx requires 16 bytes aligned input/output for uploading.
Currently only output is 16 byte aligned and assigning same width/height to
input with smaller buffer size actually, thus definitely will cause segment fault.

Can reproduce with any 1080p nv12 rawvideo input:
ffmpeg -init_hw_device qsv=qsv:hw -hwaccel qsv -filter_hw_device qsv -f rawvideo -pix_fmt nv12 -s:v 1920x1080
-i 1080p_nv12.yuv -vf 'format=nv12,hwupload=extra_hw_frames=16,hwdownload,format=nv12' -an -y out_nv12.yuv

It can fix #7418

Signed-off-by: Zhong Li <zhong.li@intel.com>
libavutil/hwcontext_qsv.c