Lightningbeam/lightningbeam-ui/lightningbeam-core
Skyler Lehmkuhl 7525a604f2 video: reuse the swscale context + gate per-frame decode tracing
get_frame rebuilt the RGBA swscale context on every decoded frame and printed
[Video Timing] lines unconditionally. A stream's frames share one input
format/size, so build the scaler once (keyed on format+dims, rebuilt only if
they change) and reuse it; gate the per-frame traces behind LB_VIDEO_DEBUG.

Cuts export wall time ~10% on a 1080p video clip (the scaler rebuild was the
bulk of the per-frame "scale" cost; it's now ~0ms). SwsContext is !Send, so the
cached scaler is wrapped in a SendScaler — sound because a VideoDecoder is only
ever touched under the VideoManager mutex (same invariant as its decoder/input).
2026-06-25 22:44:25 -04:00
..
src video: reuse the swscale context + gate per-frame decode tracing 2026-06-25 22:44:25 -04:00
tests Repair test suite + fix sample key-range overlap bug 2026-06-23 19:07:06 -04:00
Cargo.toml Pack video into .beam and stream frames + audio from the blob 2026-06-22 09:17:10 -04:00