10/12-bit HDR decodes to P010-style VAAPI surfaces (16-bit planes), which the 8-bit NV12 import couldn't handle — real HDR clips fell back to software (losing the HDR). Import them as R16/Rg16 plane textures: - dmabuf::Nv12DmaBuf gains `ten_bit`; import_raw picks R16_UNORM/R16G16_UNORM (vk) + R16Unorm/Rg16Unorm (wgpu) when set, else the existing R8/Rg8. - hw_video.rs detects 10-bit from the hw frames context sw_format (P010/P012/P016) and sets it. The NV12→RGB shader is unchanged: it samples normalized floats, and the limited/full de-quant lands at the same values regardless of bit depth. - vk_device requests TEXTURE_FORMAT_16BIT_NORM when the adapter supports it (R16/ Rg16 need it); absent → 10-bit falls back to software, 8-bit unaffected. Pairs with the PQ/HLG/BT.2020 colour math so HDR10/HLG clips now reach the GPU path end-to-end. NV12 callers (encoder, decode primitive) pass ten_bit=false. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| assets | ||
| examples | ||
| src | ||
| Cargo.toml | ||
| PLAN.md | ||
| TOOL_IMPLEMENTATION_PLAN.md | ||
| build.rs | ||