[FFmpeg-trac] #8328(undetermined:new): QSV gives much worse PSNR/SSIM for HEVC transcode than VA-API or MediaSDK
FFmpeg
trac at avcodec.org
Thu Oct 24 05:24:02 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):
Would you please help to attach
"Netflix_FoodMarket_4096x2160_10bit_420_100mbs_600.h265" in this ticket,
since the provided y4m is rather large(14GB+).
BTW, I did some tests locally with a 4K, yuv420p10 clips, and this psnr
issue is not reproduced with ffmpeg of either latest version or the commit
at end of 2018.
Clips:
https://drive.google.com/file/d/1k0e5bBPs2JDHwJZdT8qBkpMdcwHywnSq/view?usp=sharing
{{{
ffmpeg -hwaccel qsv -qsv_device /dev/dri/renderD128 -c:v hevc_qsv -i
4K_10_sunflower.mp4 -c:v hevc_qsv -b:v 20M -frames 300 qsv.h265
ffmpeg version N-93010-g26ce3a43a3 Copyright (c) 2000-2019 the FFmpeg
developers
built with gcc 7 (Ubuntu 7.4.0-1ubuntu1~18.04.1)
configuration: --enable-libmfx --disable-optimizations --enable-debug=3
--disable-stripping --enable-gpl --enable-libopenh264 --enable-libass
--enable-libfdk-aac --enable-libfreetype --enable-libmp3lame --enable-
libopus --enable-libvorbis --enable-libvpx --enable-libx264 --enable-
libx265 --enable-nonfree
libavutil 56. 26.100 / 56. 26.100
libavcodec 58. 44.100 / 58. 44.100
libavformat 58. 26.100 / 58. 26.100
libavdevice 58. 6.101 / 58. 6.101
libavfilter 7. 48.100 / 7. 48.100
libswscale 5. 4.100 / 5. 4.100
libswresample 3. 4.100 / 3. 4.100
libpostproc 55. 4.100 / 55. 4.100
Guessed Channel Layout for Input Stream #0.1 : 5.1
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '4K_10_sunflower.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2mp41
title : Big Buck Bunny, Sunflower version
artist : Blender Foundation 2008, Janus Bager Kristensen 2013
composer : Sacha Goedegebure
encoder : Lavf58.33.100
comment : Creative Commons Attribution 3.0 -
http://bbb3d.renderfarming.net
genre : Animation
Duration: 00:00:10.33, start: 0.000000, bitrate: 4955 kb/s
Stream #0:0(und): Video: hevc (Main 10) (hev1 / 0x31766568),
yuv420p10le(tv, progressive), 3840x2160 [SAR 1:1 DAR 16:9], 4560 kb/s, 30
fps, 30 tbr, 15360 tbn, 30 tbc (default)
Metadata:
handler_name : GPAC ISO Video Handler
Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, 5.1,
fltp, 394 kb/s (default)
Metadata:
handler_name : GPAC ISO Audio Handler
Stream mapping:
Stream #0:0 -> #0:0 (hevc (hevc_qsv) -> hevc (hevc_qsv))
Press [q] to stop, [?] for help
Output #0, hevc, to 'qsv.h265':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2mp41
title : Big Buck Bunny, Sunflower version
artist : Blender Foundation 2008, Janus Bager Kristensen 2013
composer : Sacha Goedegebure
genre : Animation
comment : Creative Commons Attribution 3.0 -
http://bbb3d.renderfarming.net
encoder : Lavf58.26.100
Stream #0:0(und): Video: hevc (hevc_qsv), qsv, 3840x2160 [SAR 1:1 DAR
16:9], q=2-31, 20000 kb/s, 30 fps, 30 tbn, 30 tbc (default)
Metadata:
handler_name : GPAC ISO Video Handler
encoder : Lavc58.44.100 hevc_qsv
Side data:
cpb: bitrate max/min/avg: 0/0/20000000 buffer size: 0 vbv_delay: -1
frame= 300 fps= 18 q=-0.0 Lsize= 16438kB time=00:00:09.86
bitrate=13648.0kbits/s speed=0.608x
video:16438kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB
muxing overhead: 0.000000%
}}}
{{{
ffmpeg -i 4K_10_sunflower.mp4 -i qsv.h265 -lavfi 'ssim;[0:v][1:v]psnr'
-frames 300 -f null -
ffmpeg version N-93010-g26ce3a43a3 Copyright (c) 2000-2019 the FFmpeg
developers
built with gcc 7 (Ubuntu 7.4.0-1ubuntu1~18.04.1)
configuration: --enable-libmfx --disable-optimizations --enable-debug=3
--disable-stripping --enable-gpl --enable-libopenh264 --enable-libass
--enable-libfdk-aac --enable-libfreetype --enable-libmp3lame --enable-
libopus --enable-libvorbis --enable-libvpx --enable-libx264 --enable-
libx265 --enable-nonfree
libavutil 56. 26.100 / 56. 26.100
libavcodec 58. 44.100 / 58. 44.100
libavformat 58. 26.100 / 58. 26.100
libavdevice 58. 6.101 / 58. 6.101
libavfilter 7. 48.100 / 7. 48.100
libswscale 5. 4.100 / 5. 4.100
libswresample 3. 4.100 / 3. 4.100
libpostproc 55. 4.100 / 55. 4.100
Guessed Channel Layout for Input Stream #0.1 : 5.1
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '4K_10_sunflower.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2mp41
title : Big Buck Bunny, Sunflower version
artist : Blender Foundation 2008, Janus Bager Kristensen 2013
composer : Sacha Goedegebure
encoder : Lavf58.33.100
comment : Creative Commons Attribution 3.0 -
http://bbb3d.renderfarming.net
genre : Animation
Duration: 00:00:10.33, start: 0.000000, bitrate: 4955 kb/s
Stream #0:0(und): Video: hevc (Main 10) (hev1 / 0x31766568),
yuv420p10le(tv, progressive), 3840x2160 [SAR 1:1 DAR 16:9], 4560 kb/s, 30
fps, 30 tbr, 15360 tbn, 30 tbc (default)
Metadata:
handler_name : GPAC ISO Video Handler
Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, 5.1,
fltp, 394 kb/s (default)
Metadata:
handler_name : GPAC ISO Audio Handler
Input #1, hevc, from 'qsv.h265':
Duration: N/A, bitrate: N/A
Stream #1:0: Video: hevc (Main 10), yuv420p10le(tv), 3840x2160 [SAR
1:1 DAR 16:9], 30 fps, 30 tbr, 1200k tbn, 30 tbc
Applying unspecific -frames to non video streams, maybe you meant -vframes
?
Stream mapping:
Stream #0:0 (hevc) -> ssim:main (graph 0)
Stream #0:0 (hevc) -> psnr:main (graph 0)
Stream #1:0 (hevc) -> ssim:reference (graph 0)
Stream #1:0 (hevc) -> psnr:reference (graph 0)
ssim (graph 0) -> Stream #0:0 (wrapped_avframe)
psnr (graph 0) -> Stream #0:1 (wrapped_avframe)
Stream #0:1 -> #0:2 (aac (native) -> pcm_s16le (native))
Press [q] to stop, [?] for help
Output #0, null, to 'pipe:':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2mp41
title : Big Buck Bunny, Sunflower version
artist : Blender Foundation 2008, Janus Bager Kristensen 2013
composer : Sacha Goedegebure
genre : Animation
comment : Creative Commons Attribution 3.0 -
http://bbb3d.renderfarming.net
encoder : Lavf58.26.100
Stream #0:0: Video: wrapped_avframe, yuv420p10le, 3840x2160 [SAR 1:1
DAR 16:9], q=2-31, 200 kb/s, 30 fps, 30 tbn, 30 tbc
Metadata:
encoder : Lavc58.44.100 wrapped_avframe
Stream #0:1: Video: wrapped_avframe, yuv420p10le, 3840x2160 [SAR 1:1
DAR 16:9], q=2-31, 200 kb/s, 30 fps, 30 tbn, 30 tbc
Metadata:
encoder : Lavc58.44.100 wrapped_avframe
Stream #0:2(und): Audio: pcm_s16le, 48000 Hz, 5.1, s16, 4608 kb/s
(default)
Metadata:
handler_name : GPAC ISO Audio Handler
encoder : Lavc58.44.100 pcm_s16le
frame= 300 fps=5.0 q=-0.0 Lq=-0.0 size=N/A time=00:00:10.00 bitrate=N/A
speed=0.167x
video:314kB audio:3600kB subtitle:0kB other streams:0kB global headers:0kB
muxing overhead: unknown
[Parsed_ssim_0 @ 0x559413792f00] SSIM Y:0.998935 (29.728072) U:0.998056
(27.112709) V:0.997992 (26.972283) All:0.998632 (28.637829)
[Parsed_psnr_1 @ 0x559413796300] PSNR y:52.651755 u:53.405014 v:53.026333
average:52.830453 min:42.830295 max:inf
}}}
--
Ticket URL: <https://trac.ffmpeg.org/ticket/8328#comment:4>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker
More information about the FFmpeg-trac
mailing list