[FFmpeg-trac] #8328(undetermined:new): QSV gives much worse PSNR/SSIM for HEVC transcode than VA-API or MediaSDK

FFmpeg trac at avcodec.org
Fri Oct 25 12:45:43 EEST 2019


#8328: QSV gives much worse PSNR/SSIM for HEVC transcode than VA-API or MediaSDK
-------------------------------------+-------------------------------------
             Reporter:  eero-t       |                    Owner:
                 Type:  defect       |                   Status:  new
             Priority:  normal       |                Component:
                                     |  undetermined
              Version:  unspecified  |               Resolution:
             Keywords:               |               Blocked By:
             Blocking:               |  Reproduced by developer:  0
Analyzed by developer:  0            |
-------------------------------------+-------------------------------------

Comment (by fulinjie):

 It could be reproduced with the attached clips.

 The output of QSV and VAAPI have the different number of B-frames between
 non-B-frames of B frames.

 QSV: 6 (not reach the maximum);
 VAAPI: 2;

 Hence it leads to the PSNR gap.

 The root cause seems to be that QSV and VAAPI have the different
 GopRefDist size by default.

 VAAPI: 3

 {{{
 [hevc_vaapi @ 0x563647540b00] Using intra, P- and B-frames (supported
 references: 3 / 1).
 }}}

 QSV: 9

 {{{
 [hevc_qsv @ 0x564c7866da40] GopPicSize: 248; GopRefDist: 9; GopOptFlag:
 closed ; IdrInterval: 1

 }}}

 To verify:

 Add "-bf 2" to match the default behavior of VAAPI
 {{{
 ffmpeg -v verbose -hwaccel qsv -qsv_device /dev/dri/renderD128 -c:v
 hevc_qsv -i Netflix_FoodMarket_4096x2160_10bit_420_100mbs_60fps_7.h265
 -c:v hevc_qsv -b:v 20M -bf 2 output.h265
 }}}

 (add -bf 2 makes no difference for VAAPI)

 Before:
 PSNR: average:28.524304
 With "-bf 2":
 PSNR: average:31.516557

 Please help to verify and correct me if I was wrong.

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


More information about the FFmpeg-trac mailing list