hw: surface import_raw failures (diagnose washed-out 10-bit HDR)
A failed DMA-BUF import returned None silently → core falls back to software, whose RGBA path does no BT.2020→709 gamut conversion, so HDR clips render washed out. The detection log fires before import_raw, so it didn't reveal this. Log the actual import error (with ten_bit) instead of swallowing it, to confirm whether 10-bit P010 import is failing. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
parent
7c2ac0e4d8
commit
28b14b2ad0
|
|
@ -133,7 +133,15 @@ impl HwVideoImporter for SharedHwImporter {
|
|||
|
||||
let imported = dmabuf::import_raw(&self.device, &self.adapter, &buf);
|
||||
ff::av_frame_free(&mut (drm_f as *mut _)); // the fd was dup'd into Vulkan
|
||||
let (y, uv) = imported.ok()?.into_planes();
|
||||
let (y, uv) = match imported {
|
||||
Ok(t) => t.into_planes(),
|
||||
Err(e) => {
|
||||
// Surface the failure: a silent None here makes core fall back to software (no gamut
|
||||
// conversion → BT.2020 looks washed out). 10-bit P010 import is the likely culprit.
|
||||
eprintln!("[hw_video] import_raw failed (ten_bit={ten_bit}): {e}");
|
||||
return None;
|
||||
}
|
||||
};
|
||||
Some(GpuVideoFrame {
|
||||
y: Arc::new(y),
|
||||
uv: Arc::new(uv),
|
||||
|
|
|
|||
Loading…
Reference in New Issue