[FFmpeg-trac] #7943(undetermined:new): Ffmpeg QSV backend uses >2x more GPU memory compared to VAAPI or MSDK

FFmpeg trac at avcodec.org
Wed Oct 16 12:48:23 EEST 2019


#7943: Ffmpeg QSV backend uses >2x more GPU memory compared to VAAPI or MSDK
-------------------------------------+-------------------------------------
             Reporter:  eero-t       |                    Owner:
                 Type:  defect       |                   Status:  new
             Priority:  normal       |                Component:
                                     |  undetermined
              Version:  git-master   |               Resolution:
             Keywords:               |               Blocked By:
             Blocking:               |  Reproduced by developer:  0
Analyzed by developer:  0            |
-------------------------------------+-------------------------------------

Comment (by fulinjie):

 This seems to be similar with the performance gap issue #7690.

 There is an internally memory allocation and memory copy in MSDK core
 library(may not be involved in sample_multi_transcode),
 CommonCORE::DoFastCopyExtended

 https://github.com/Intel-Media-
 SDK/MediaSDK/blob/master/_studio/shared/src/libmfx_core.cpp#L1522

 Thus the memory usage is twice large.

 https://github.com/Intel-Media-
 SDK/MediaSDK/issues/1550#issuecomment-515417010

 It could be verified by gpu_copy decode which do not allocate memory
 internally:

 Allocate memory internally:
 ffmpeg -y -hwaccel qsv -qsv_device /dev/dri/renderD128 -c:v hevc_qsv -an
 -i SES.Astra.UHD.Test.1.2160p.UHDTV.AAC.HEVC.x265-LiebeIst.mkv -vf
 hwdownload,format=p010 -f rawvideo /dev/null

 ffmpeg: 155 objects, 1680379904 bytes
 1.6 GB

 No memory allocation internally with gpu_copy:
 ffmpeg -y -qsv_device /dev/dri/renderD128 -gpu_copy on -c:v hevc_qsv -an
 -i SES.Astra.UHD.Test.1.2160p.UHDTV.AAC.HEVC.x265-LiebeIst.mkv -f rawvideo
 /dev/null

 ffmpeg: 140 objects, 393277440 bytes
 400 MB

 The memory gap is obvious.

--
Ticket URL: <https://trac.ffmpeg.org/ticket/7943#comment:1>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list