[FFmpeg-trac] #9377(undetermined:new): QSV MPEG2 => H264 transcode PSNR dropped by 32%

FFmpeg trac at avcodec.org
Thu Oct 28 14:50:30 EEST 2021


#9377: QSV MPEG2 => H264 transcode PSNR dropped by 32%
-------------------------------------+-------------------------------------
             Reporter:  eero-t       |                    Owner:  (none)
                 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 eero-t):

 > I cannot reproduce the PSNR drop between the two commits provided by
 you. Is it a stream specified problem?

 That's possible.  Another possibility is that your test environment did
 not have new enough version of rest of the stack.

 In my case I was using these versions:
 * git://anongit.freedesktop.org/drm-tip at
 940478dea0bccfe1ef632c6cbfca66c5d3fc345e 2021-06-19 drm-tip: 2021y-06m-
 19d-21h-09m-09s UTC integration manifest
 * git://github.com/intel/gmmlib at
 9253eb8b949515d2a5030f99163a35567fe81838 2021-06-17 Updating the
 Licensening details
 * git://github.com/intel/libva at c7c404135a2dee09af4d55412e797d9904802eb9
 2021-06-17 update NEWS for 2.12.0
 * git://github.com/intel/media-driver at
 08cbe4c102d1fe8ba1f5b699b1a0c1c831aef8f7 2021-06-18 set the picture flag
 to be invalid frame if the ref frame is invalid
 * git://github.com/Intel-Media-SDK/MediaSDK at
 883142f1f10186c84cadc9d5bf63d96934270567 2021-06-11 [VP9e] Add WebRTC mode

 I have data for those components from that day until yesterday, and there
 has been no improvement since the regression.  This drop is still visible
 on all machines from which I have data (BXT, SKL, KBL, CML and TGL).

 => i.e. you can pick any later version of above components.

 ("drm-tip" kernel repo gets rebased to upstream regularly, so the above
 kernel commit ID is not available any more, but you can just use any any
 later commit.)


 PSNR remains still at the earlier higher level when transcode is done
 using VA-API:
 {{{ffmpeg -hwaccel vaapi -vaapi_device /dev/dri/renderD128
 -hwaccel_output_format vaapi -i 1920x1080i_29.97_20mb_mpeg2_high.mpv -c:v
 h264_vaapi -b:v 6000K -compression_level 7 -an -vframes 2400 -y
 0024_HD17i7_1.0.h264}}}

 Or using MediaSDK tool for that:
 {{{sample_multi_transcode -i::mpeg2 1920x1080i_29.97_20mb_mpeg2_high.mpv
 -o::h264 output/0024_HD17i7_1.0.h264 -b 6000 -u 7 -n 2400 -async 4 -hw}}}

 => i.e. this drop is really specific to how FFmpeg uses/configures
 MediaSDK (QSV).

 (Between the listed FFmpeg commit IDs, there was also a minor update to
 drm-tip kernel, but I do not see how kernel change could affect video
 quality, and *only* for FFmpeg with QSV, but not FFmpeg with VA-API or
 MediaSDK.)
-- 
Ticket URL: <https://trac.ffmpeg.org/ticket/9377#comment:4>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list