Open darkblaze69 opened 2 hours ago
Could you report this to Mesa? Your GPU is extremely new, so there's a high chance this will get fixed.
Probably duplicate of #14956 but from different vendor. The crash is different, but still I don't think mpv is doing anything wrong here
What should I report there ? which relevant lines form the logs to provide?
Also note it seems a regression with specific mpv commit which definitely flips normal > crash behavior.
Also note it seems a regression with specific mpv commit which definitely flips normal > crash behavior.
Yes, we are trying to upload more formats now during the probing phase. This doesn't change the fact that it shouldn't crash. At most, it should print an error and move on. So, it’s not mpv’s fault for crashing. In retrospect, it may be a bit tricky to handle all the failing cases with unusual formats and various hardware/driver bugs. We might need to implement some workarounds, but to be clear, this should be fixed upstream.
We will react as necessary.
We could try probing something more common if possible as a workaround I suppose. @darkblaze69: does it still crash if you force it to NV12?
diff --git a/video/out/hwdec/hwdec_vaapi.c b/video/out/hwdec/hwdec_vaapi.c
index e8d4f159db..99fb8c57ae 100644
--- a/video/out/hwdec/hwdec_vaapi.c
+++ b/video/out/hwdec/hwdec_vaapi.c
@@ -456,7 +456,7 @@ static void try_format_upload(struct ra_hwdec *hw, enum AVPixelFormat pixfmt)
AVBufferRef *hw_pool = av_hwframe_ctx_alloc(p->ctx->av_device_ref);
mp_update_av_hw_frames_pool(&hw_pool, p->ctx->av_device_ref, IMGFMT_VAAPI,
- p->formats[0], src->w, src->h, false);
+ IMGFMT_NV12, src->w, src->h, false);
struct mp_image *dst = mp_av_pool_image_hw_upload(hw_pool, src);
I'm also curious if increasing the image size has any effect. Try this as well
diff --git a/video/out/hwdec/hwdec_vaapi.c b/video/out/hwdec/hwdec_vaapi.c
index e8d4f159db28..39b0eda3f3f2 100644
--- a/video/out/hwdec/hwdec_vaapi.c
+++ b/video/out/hwdec/hwdec_vaapi.c
@@ -450,7 +450,7 @@ static void try_format_upload(struct ra_hwdec *hw, enum AVPixelFormat pixfmt)
if (!p->formats || !p->formats[0])
return;
- struct mp_image *src = mp_image_alloc(mp_fmt, 2, 2);
+ struct mp_image *src = mp_image_alloc(mp_fmt, 32, 32);
if (!src)
return;
We could try probing something more common if possible as a workaround I suppose. @darkblaze69: does it still crash if you force it to NV12?
I would put the try_format_upload
into select_format or after it and check only the formats we are trying to use and retry select_format if try_format_upload
fails, until we find something working or have no more formats to check. This lazy change would allow to avoid probing formats that we would never use in practice.
I'm also curious if increasing the image size has any effect. Try this as well
Like said on IRC some time ago, I think 16 or 64 should be safe here in other place we use 128. Though if 2x2 doesn't work that means we either don't align stride correctly for images or it is just a bug in driver.
I know it is little bit unfortunate we have to deal with this.
Note thay this needs to be reported to Intel-media-driver rather than mesa. There are often rough edges for new hardware. I had to report a bunch of problems for Gen12.
Tried both patches combined and separate, no luck.
I would put the try_format_upload into select_format or after it and check only the formats we are trying to use and retry select_format if try_format_upload fails
I guess this is the way to go although it might get messy with the VO and hwdec layers.
I would put the try_format_upload into select_format or after it and check only the formats we are trying to use and retry select_format if try_format_upload fails
I guess this is the way to go although it might get messy with the VO and hwdec layers.
We can test only formats from upload formats list, the target formats is expected to work.
mpv Information
Other Information
Reproduction Steps
mpv --hwdec=vaapi --fs ~/Videos/bbb_sunflower_2160p_60fps_normal.mp4
Downgrading to 0.38 allows playing normally.
Bisected to [6797f543782d29561ec7b28163ec82e9a4d79318] hwdec/vaapi: additionally probe hwupload format conversions
Video trying to play:
Expected Behavior
playing video
Actual Behavior
crash
Log File
output.txt
gdb.log
Sample Files
No response
I carefully read all instruction and confirm that I did the following:
--log-file=output.txt
.