intel / cartwheel-ffmpeg

Intel developer staging area for unmerged upstream patch contributions to FFmpeg
GNU Lesser General Public License v2.1
93 stars 33 forks source link

"GPU Hang" for 4K UHD 10-bit video decode #227

Closed MartinPulec closed 1 year ago

MartinPulec commented 1 year ago

Hi again, I am not sure if this is the right place to report but if not, perhaps you'd be able to forward me where appropriate.

Using both current cartwheel patchset and also upstream FFmpeg with U22.04 and current drivers on i7-1260P iGPU, I am getting "GPU Hang" on hevc_qsv decoder:

$ ffmpeg -f lavfi -i testsrc=size=3840x2160 -t 1 -pix_fmt yuv444p10le -c:v libx265 testsrc.mp4
$ ffmpeg -c:v hevc_qsv  -i testsrc.mp4 out.mp4
[ irrelevant parts omitted ]
Error while decoding stream #0:0: Input/output error
[hevc_qsv @ 0x556ad5b75000] Error during QSV decoding.: GPU Hang (-21)
[ the above 2 lines repeat for every frame ]

It is definitely properties-dependent – using either pixfmt yuv420p (but not yuv444p) or FHD resolution, it works flawlessly. Also not sure if is interesting, but when lowering the resolution just below 4K UHD, the decompression succeeds but approaching this resolution, the decode duration significantly increases.

xhaihao commented 1 year ago

Hi again, I am not sure if this is the right place to report but if not, perhaps you'd be able to forward me where appropriate.

Could you try the latest stable packages (https://github.com/oneapi-src/oneVPL-intel-gpu/releases/tag/intel-onevpl-22.6.5) ? Please file your GPU hang issue on https://github.com/intel/media-driver/issues if you can reproduce this issue with the stable release. ( I can't reproduce this issue with the stable release).

Using both current cartwheel patchset and also upstream FFmpeg with U22.04 and current drivers on i7-1260P iGPU, I am getting "GPU Hang" on _hevcqsv decoder:

$ ffmpeg -f lavfi -i testsrc=size=3840x2160 -t 1 -pix_fmt yuv444p10le -c:v libx265 testsrc.mp4
$ ffmpeg -c:v hevc_qsv  -i testsrc.mp4 out.mp4
[ irrelevant parts omitted ]
Error while decoding stream #0:0: Input/output error
[hevc_qsv @ 0x556ad5b75000] Error during QSV decoding.: GPU Hang (-21)
[ the above 2 lines repeat for every frame ]

It is definitely properties-dependent – using either pixfmt yuv420p (but not yuv444p) or FHD resolution, it works flawlessly. Also not sure if is interesting, but when lowering the resolution just below 4K UHD, the decompression succeeds but approaching this resolution, the decode duration significantly increases.

SW encoding is involved with your command. Please try the commands below if decoding only is required.

$ ffmpeg -hwaccel qsv -c:v hevc_qsv -i testsrc.mp4 -f null - or $ ffmpeg -c:v hevc_qsv -i testsrc.mp4 -f null -

MartinPulec commented 1 year ago

Thanks for the instructions. I've tried both commands but with same outcome. I've already reported the issue with further details so we may perhaps close it here.

xhaihao commented 1 year ago

driver issue: https://github.com/intel/media-driver/issues/1609