Lightningbeam/lightningbeam-ui/lightningbeam-editor/src
Skyler Lehmkuhl 6348e57de0 nv12: convert with the source colorspace matrix (not hardcoded BT.709)
The NV12→RGB pass hardcoded BT.709, so SD (BT.601) clips had slightly wrong hues.
Read each frame's AVColorSpace in the importer and derive the Y'CbCr→R'G'B'
matrix (BT.709/601/240M/2020; Unspecified guessed by height like swscale/players),
carry the four coefficients on GpuVideoFrame, and apply them in the shader.

- core: GpuVideoFrame.coeffs + ycbcr_coeffs(kr, kb) helper.
- hw_video.rs: map AVColorSpace → (kr, kb) → coeffs.
- nv12_blit{.rs,.wgsl}: uniform grows to 80 bytes (adds a coeffs vec4); the matrix
  multiply uses params.coeffs instead of literals.

BT.2020's transfer is still approximated as sRGB. The DRM-modifier-without-SAMPLED case stays a graceful software fallback.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-26 02:32:57 -04:00
..
export editor: wire hardware video decode + NV12 preview compositing (Stage 3c-preview) 2026-06-26 02:21:22 -04:00
panes nv12: convert with the source colorspace matrix (not hardcoded BT.709) 2026-06-26 02:32:57 -04:00
preferences Stream audio & video from .beam container; waveform LOD pyramid + persistence 2026-06-17 13:52:38 -04:00
tools Add drawing tablet input support 2026-03-11 10:58:30 -04:00
widgets make sample load menus consistent 2026-02-16 19:12:21 -05:00
config.rs Stream audio & video from .beam container; waveform LOD pyramid + persistence 2026-06-17 13:52:38 -04:00
cqt_gpu.rs Add clip split and duplicate commands 2026-02-15 02:11:57 -05:00
curve_editor.rs Clean up build warnings 2026-06-21 16:48:59 -04:00
custom_cursor.rs Add tool skeletons 2026-03-06 07:22:50 -05:00
debug_overlay.rs Composite grouped/nested video on the GPU path 2026-06-22 17:38:30 -04:00
default_instrument.rs clean up some compiler warnings 2025-12-03 06:39:26 -05:00
effect_thumbnails.rs Fix gamma handling and improve brush canvas performance 2026-06-16 08:32:39 -04:00
gpu_brush.rs export: cache the static background + bilinear video, add render profiling 2026-06-25 23:30:51 -04:00
gpu_timer.rs Composite grouped/nested video on the GPU path 2026-06-22 17:38:30 -04:00
hw_video.rs nv12: convert with the source colorspace matrix (not hardcoded BT.709) 2026-06-26 02:32:57 -04:00
keymap.rs Onion skinning (raster): toggle + tinted ghosts of the active layer 2026-06-20 23:05:57 -04:00
main.rs editor: wire hardware video decode + NV12 preview compositing (Stage 3c-preview) 2026-06-26 02:21:22 -04:00
main.rs.backup Select and move shapes 2025-11-18 00:22:28 -05:00
menu.rs Onion skinning (raster): toggle + tinted ghosts of the active layer 2026-06-20 23:05:57 -04:00
notifications.rs Fix video export resolution scaling and post-export UI hang 2026-06-16 08:35:52 -04:00
nv12_blit.rs nv12: convert with the source colorspace matrix (not hardcoded BT.709) 2026-06-26 02:32:57 -04:00
raster_tool.rs Clean up build warnings 2026-06-21 16:48:59 -04:00
sample_import.rs Repair test suite + fix sample key-range overlap bug 2026-06-23 19:07:06 -04:00
sample_import_dialog.rs Initial work on movie clips 2026-02-21 00:54:38 -05:00
tablet.rs fix build issues 2026-06-02 13:41:10 -04:00
test_mode.rs Clean up build warnings 2026-06-21 16:48:59 -04:00
theme.rs Repair test suite + fix sample key-range overlap bug 2026-06-23 19:07:06 -04:00
theme_render.rs Clean up build warnings 2026-06-21 16:48:59 -04:00
waveform_gpu.rs Stream audio & video from .beam container; waveform LOD pyramid + persistence 2026-06-17 13:52:38 -04:00