Closed rmader closed 8 months ago
This works on wlroots/sway git with both vaapi and no hwdec
This works on wlroots/sway git with both vaapi and no hwdec
What hardware is that? Intel by chance?
P.S.: and did you double-check that P010 is indeed used, not NV12?
Works on both Intel i5-13600k iGPU, and RX 6600 XT.
and did you double-check that P010 is indeed used, not NV12?
yes
VO: [dmabuf-wayland] 3840x2160 vaapi[p010]
Hm - maybe a already fixed version of ffmpeg? Mine is ffmpeg-6.0-11.fc38
, which do you have?
I was indeed running off ffmpeg-git, but it works for me with ffmpeg-6 as well.
no vaapi case appears to work as it should too
[autoconvert] HW-uploading to vaapi
[autoconvert] Converting yuv420p10 -> p010
[hwupload] upload p010 -> vaapi[p010]
Oh this case definitely crashes for me too (rx 560; maybe not quite modern). I assume this is some driver weirdness or something, but I was never sure.
Hm, @llyyr, IIUC you use a Intel CPU, correct? Given that the crash is in memcpy()
/__memmove_avx_unaligned_erms()
, maybe that a bug with AMD CPUs?
The other thing that puzzles me why VA-API does not work here but for you, as it clearly works with Gstreamer. Guess will have to go debug :)
Yep, I am on an Intel CPU. And if it matters, I also compile all of mesa/ffmpeg/mpv from git with no compiler optimizations. So it's possible that might be related as well? Still works for me with all of them compiled with -march=native and -O2
Hm interesting - I don't know what changed, but forcing VAAPI just started working for me (mpv --hwdec=vaapi --vo=dmabuf-wayland camp_by_sony.mp4 --fs
).
So the two issues I still see:
Converting yuv420p10 -> p010
crashes on certain setups.VAAPI is not selected automatically
Oops, this actually never happens, my bad - --hwdec=vaapi
is required.
So the only issue is Converting yuv420p10 -> p010
crashing on some setups.
Looking at the stack again, the crash happens in mp_av_pool_image_hw_upload()
so AFAICS in the [hwupload] upload p010 -> vaapi[p010]
step - which IIUC uploads from RAM to VRAM.
This crashing in memcpy()
->__memmove_avx_unaligned_erms()
appears to be the actual issue, which again wouldn't be as surprising. Maybe a kernel issue in fact.
Are you using the mesa driver? If so it might make sense to report it upstream to mesa.
Are you using the mesa driver? If so it might make sense to report it upstream to mesa.
Yep, I'm trying to reach out to some AMD folks. Given that Mesa doesn't show up in the backtrace I rather suspect the kernel driver though.
Given that the crash is in memcpy()/__memmove_avx_unaligned_erms(), maybe that a bug with AMD CPUs?
A bit late here, but I can indeed confirm the same thing. My intel laptop has zero problems with the p010 -> vaapi upload step. It works just fine. On my desktop where this crashes, I'm using a Ryzen 5 3600 so it really seems somehow related to AMD CPUs.
Likely related: https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/2733
This actually doesn't crash anymore for me. I went back and checked a commit from this issue to double check and the p010 -> vaapi upload works no problem. I guess it was fixed at some point somewhere by someone (the kernel?). I'm on 6.6.7.
I'm fairly certain this was fixed by someone somewhere. I've reliably had p010 uploads for the past few months on AMD.
Update description
This is on latest
master
andffmpeg-6.0-11.fc38
P010 is basically the 10bit equivalent of NV12 and widely supported by modern GPUs. Right now I can't play it with
vo_dmabuf_wayland
, neither with software nor hardware decoding (see below). In both cases it does not like issues invo_dmabuf_wayland
, but opening the issue for it anyway so we can triage further.STR:
mpv --vo=dmabuf-wayland camp_by_sony.mp4 --fs
ffmpeg
/libavutil/imgutils.c
with the stack belowbt full
``` #0 0x00007f4135028307 in __memmove_avx_unaligned_erms () at /lib64/libc.so.6 #1 0x00007f4135c57ff6 in memcpy (__len=7680, __src=See also https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/2733