Lightningbeam/lightningbeam-ui
Skyler Lehmkuhl 1848c920d9 editor: wire hardware video decode + NV12 preview compositing (Stage 3c-preview)
Make the dormant core HW-decode engine live for the preview path:

- hw_video.rs: editor's HwVideoImporter — maps a decoded VAAPI surface to a
  DRM-PRIME DMA-BUF and imports it as wgpu NV12 plane textures on the *shared*
  device (the only one with the import extensions). install() creates the VAAPI
  device and injects it + the importer into the VideoManager.
- main.rs: track whether the shared device is actually in use; only then (Linux,
  not LB_NO_SHARED_DEVICE) install hardware decode, using the CreationContext's
  shared device + adapter.
- nv12_blit.rs + nv12_blit.wgsl: NV12 plane textures → BT.709 → sRGB-encoded →
  linear, written straight into the Rgba16Float HDR layer (no CPU upload). Colour
  math mirrors the software path so HW/SW video match; honours full_range.
- stage.rs: the preview Video arm branches on inst.gpu (NV12 blit) vs rgba_data
  (existing upload+blit_straight); sets render_hardware_ok = !cpu_renderer so the
  CPU fallback still gets software frames.
- video_exporter.rs: sets render_hardware_ok(false) before both compositing
  passes — export composites on the encoder's separate device, so a hardware
  decoder downloads to CPU instead (export stays software, correct).
- dmabuf.rs: imported plane textures now also carry SAMPLED/TEXTURE_BINDING so
  they can be sampled by the NV12 blit (they were render-target-only); into_planes
  hands the textures to the longer-lived GpuVideoFrame.
- video.rs: cache-key the GPU/CPU representation on want_gpu (HW-configured AND
  render_hardware_ok) so software-only decode keeps a single cache entry.

Preview only this pass; export GPU-residency is the 3c-export follow-up. Untested
at runtime here (no GPU/display in container) — both crates compile.
2026-06-26 02:21:22 -04:00
..
beamdsp Code cleanup 2026-02-19 11:19:44 -05:00
egui_node_graph2 highlight node connections directly 2026-02-20 11:13:34 -05:00
gpu-video-encoder editor: wire hardware video decode + NV12 preview compositing (Stage 3c-preview) 2026-06-26 02:21:22 -04:00
lightningbeam-core editor: wire hardware video decode + NV12 preview compositing (Stage 3c-preview) 2026-06-26 02:21:22 -04:00
lightningbeam-editor editor: wire hardware video decode + NV12 preview compositing (Stage 3c-preview) 2026-06-26 02:21:22 -04:00
.gitignore Add Rust desktop UI with Blender-style pane system 2025-11-12 06:13:00 -05:00
Cargo.lock Wire zero-copy VAAPI H.264 into video+audio export 2026-06-25 15:44:50 -04:00
Cargo.toml Add gpu-video-encoder crate: zero-copy VAAPI encode (validated) 2026-06-23 19:07:37 -04:00
GPU_VIDEO_DECODE_PLAN.md export: cache the static background + bilinear video, add render profiling 2026-06-25 23:30:51 -04:00
build-static.sh Video export 2025-12-07 13:17:21 -05:00
build-windows.bat windows build fixes 2026-02-24 14:40:16 -05:00