• Zhong Li's avatar
    lavu/qsv: make a copy as libmfx alignment requirement for uploading · 681aa7d1
    Zhong Li authored
    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: 's avatarZhong Li <zhong.li@intel.com>
    681aa7d1
hwcontext_qsv.c 39 KB