Commits
Commits on
33ee2badf91aedd123dfdfa602461eda4e2e4937Filtered to crates/engine/src/decode.rsClear filter2026-09-24
fix(decode): stretch before the turn, so a rotated anamorphic file fills its canvasAhmet Kaan Gümüş · f4bc699
fix(decode): stretch before the turn, so a rotated anamorphic file fills its canvas A 1440x1080 SAR-4/3 file with a 90-degree display matrix rendered 1440x1440: the render composed turn-then-stretch, landing the ratio on the coded height, and the square raster sat letterboxed inside the 1080x1920 canvas the probe declares -- bars in the preview and baked into the export. The ratio belongs to the axis that was horizontal BEFORE the turn: the coded width is stretched by h/v and the turn then swaps the stretched pair, which is what the probe has declared all along. Render::frame and place_picture now both stretch first, the one order that agrees with the probe. The suite's rotated case had been vacuous -- the in-test fixture was a setsar file with no display matrix, asserting nothing about the turn. It now remuxes a real 90-degree matrix on (-display_rotation 90, the gen_fixtures pattern), asserts the probe's swapped stretched pair (1080x1920, not 1440x1440), and drives the render through the same assertions; the export test grows the rotated clip with preview-vs-export equality. Mutation witness: with the render reverted to turn-then-stretch the new assertions fail with exactly left (1440, 1440) / right (1080, 1920). The demux comment now names the render's order and the failure the other one produces, so the two can't drift again.
fix(decode): size the stretch buffers before the resampleAhmet Kaan Gümüş · c3f9e0a
fix(decode): size the stretch buffers before the resample scale_i420 asserts exact planes; the stretch buffers were empty Vecs, so the first anamorphic frame died on the destination-luma assertion instead of being stretched. Sized with the rest of the steady-state scratch, once per worker, exactly as is.
apply(decode): stretch the anamorphic picture once, at the single post-decode stepAhmet Kaan Gümüş · b3a5acb
apply(decode): stretch the anamorphic picture once, at the single post-decode step ffmpeg applies the sample aspect exactly once, at the conversion to the square-pixel raster; so does this engine now. Render::frame takes the file's pixel_aspect beside its rotation and, only where the samples are not square, resamples the coded picture to the displayed width with the existing scale_i420 -- the same bilinear the canvas places through. A square-pixel file takes the branch by a bool and not one byte is touched: the passthrough fast path, the tonemap FNV constants and the graded path are all exactly what they were (matrix_render and tonemap_render green unchanged). The export takes the same two facts through place_picture -- stretch after turn, the order ffmpeg composes -- and an anamorphic span is barred from the DMA fast path, whose whole premise is that no seat touches a sample before the encoder. Dissolve's B half carries its own file's aspect beside its own rotation. VhMeta grows the coded pair and the aspect ratio, so the plugin ABI answers both questions a display size may now raise: what to draw and what the samples are stored at.
🐛 fix(decode): the visualizer seat masks what it declares, and floors nothingAhmet Kaan Gümüş · 9ab653d
🐛 fix(decode): the visualizer seat masks what it declares, and floors nothing The wave lane's worker declaration carried a `.max(2)` floor under the even mask. It kept the worker alive, but it broke the decode lane's inherited answer for a canvas with no size: a `Composer::passthrough()` canvases came back as a 2x2 picture instead of the empty one it asked for, whose own test caught it on the first full run of the merged tree. The mask alone is what both need: the declared size is the size the planes really have, so the conversion always has the chroma plane it indexes, while a canvas with nothing to divide still takes the painter's empty picture (`empty_peaks_paint_the_flat_line`'s neighbour in `visualizer_window_i420`). Witnessed at 1920x1, 1921x1081, 320x1 and 321x181 through the seat and through `set_resolution`.
✅ test(engine): the seat, the gap and the silent pin are witnessed where they can beAhmet Kaan Gümüş · 9e8397d
✅ test(engine): the seat, the gap and the silent pin are witnessed where they can be Two witnesses and one determinism fix, from the refute-first pass on the decode and wave lanes: - the visualizer's declared canvas dims are masked to the even size the planes really have, so a one-pixel-high canvas and an odd one paint through the real seat instead of killing its worker. The witness drives `open_visualizer` at 1920x1 and 1921x1081; with the unmasked declaration put back it dies with the dead channel the probe saw. The export side already masks its own dims (`ClipDecoder::next`). - a span whose codec has no seat at all reports `Backend::Gap`, not the hardware session that produced nothing: witnessed through `run_span` itself on a VP8 file under the `VE_SW` pin, since every public door refuses a plugin-only codec before a span exists. - the audio device counter is no longer claimed absolutely in a parallel suite: the silent pin is asserted on the session the test owns, with the counter read as a delta under a module lock. Also states the run_hw abort-path defect this box cannot reach (no plugin): see the integration report.
🐛 fix(engine): merge the wave lane into mainAhmet Kaan Gümüş · b747d45
🐛 fix(engine): merge the wave lane into main A film's visualizer reads a window of its envelope instead of the whole file, a dead audio output is re-opened rather than ending the session's sound, and the counter claims hold under a parallel runner. Lane: lane-bughunt-wave.
🐛 fix(engine): a window starts at the bucket the decode was asked forAhmet Kaan Gümüş · e5f0b93
🐛 fix(engine): a window starts at the bucket the decode was asked for RW1, and it is the real one: `viz_window` opens the file at the bucket it is handed, `fold_window` indexes the slice from there, so `peaks[0]` *is* absolute bucket `first`. `view_at` labelled it `first - seek` and served the margin -- so every `view.at(abs)` of a windowed frame read the envelope's bucket `abs + 12000`: +3 s at 4000 buckets a second, the file's tail painted silence (slice exhausted), and a preview frame at a window grid line was not the frame export paints from the whole envelope. The fix is the label: ask from `first.saturating_sub(seek)` and serve what comes back, which is what the margin was always for. Two of my own fixtures could not see it, and that is the lesson worth writing down: a five-second clip's first window starts at bucket 0 (where the label is a no-op) and the 40-minute FLAC was a 440 Hz sine at 8 kHz, whose 3 s shift is 1320 whole periods -- every bucket identical. The new test is *noise* in FLAC: buckets must be *equal*, not merely close, at the file's head, its middle, both sides of a 30 s grid line and its last window, and the frame at each has to be the frame `visualizer_i420` paints for the same time. FAIL-BEFORE, this tree: `t=30.5: 8002 of 8002 windowed buckets are not the envelope's, 0 out of reach`; PASS-AFTER: 18 waveform tests green. RW3: the summary pass folded the ask's whole-file probe and then re-decoded the same sound in the windows it spawned -- 1.875x a file at the eight-window ceiling, serial, on the first look edit's critical path. The first window now stops at the joint the next was told to start at, exactly as the envelope's own split stops it, so the windows partition the file and a pass reads it once. FAIL-BEFORE: `folded 1440000 frames of a 960000-frame file, 1.50x over`; PASS-AFTER: the same test asserts within 5% of 1.00x, and the peak/length equalities against the whole envelope still hold (`viz_summary`'s stop samples now mirror `peaks_over`'s, so it folds the same sample set). RW5: `VizView` carries `per_sec`, the rate its envelope was drawn at, and the painter reads it instead of hard-coding `VIZ_BUCKETS_PER_SEC` -- the invariant is structural now (an ask at another rate is painted at that rate) rather than accidental. `VizView::whole` is the one place the visualizer's rate is named. RW4b: the seat now declares the canvas masked to even dimensions and floored at two, which is what the painter returns -- an odd `resolution 1921 1081` line used to declare a size the planes never had. Kept as an invariant, *not* claimed as a reproduced fix: the witness (canvases 1920x1, 1921x1081, 320x1, 321x181 through `PlaybackSession::set_resolution` + `try_frame`) passes with the mask reverted as well, so I could not reproduce the panic on this tree and say so in the test's own doc. RW4a is refuted: the even-dimension mask lives in the shared painting body (`visualizer_window_i420`, decode.rs:2199-2200), which both entry points go through; `visualizer_i420` is a one-line wrapper over it. Also honest-doc fixes from the same review: RW2's notice doc no longer implies a front-end shows a mid-session death (it is fetchable through `audio_disabled_reason`, which the app reads where a notice is *built*); and a failed window's comment now matches the code (the seat latches it, the memo does not).
⚡️ perf(engine): a film's visualizer reads a window of its envelope, not the whole fileAhmet Kaan Gümüş · 0cf7335
⚡️ perf(engine): a film's visualizer reads a window of its envelope, not the whole file A look drag re-opens the visualizer seat once per pointer sample, and the seat asks for the clip's whole envelope: two hours at the visualizer's 4000 buckets a second is 230 MB, past `PEAKS_MEMO_BUCKETS`, so the memo refuses to hold it and every one of those asks decoded the whole file again -- six channels through `ec-aac`, ~7 s of four cores, per pointer sample, for a picture that shows two seconds of sound. The cap is not the bug: one entry that size is not a memo. The seat's ask is now the shape of what it paints. `viz_envelope` answers with the memo's own whole-file handle when it holds one, and otherwise with a *window* of the file's envelope about each frame's own time -- 30 s of buckets, decoded once per window per process, held under a 4M-bucket ceiling (VIZ_WINDOW_MEMO_BUCKETS, 32 MB, ~34 windows for every source in the session). A window is 1.5% of the film's envelope and a drag re-asks the one it is in. Two scalars of the whole file are still needed to draw any frame of it: the file's loudest bucket, which every column is scaled by, and its exact length, which is where "past the end of the file" is measured. `viz_summary` reads both off one pass that keeps no buckets -- the same windows, threads and opens `peaks_over` decodes an envelope with, so the peak is the envelope's own -- and the summary is kept per stream, sixteen bytes rather than 230 MB. Both routes are memoized; a failed ask still is not. `VizView` is what a painter is handed: either the whole envelope (`visualizer_i420`, unchanged for export and the tests) or a window with the file's own `total` and `peak`. A view that is a window cannot derive either from itself, which is why they travel with it. Also guards the sample rate that becomes samples-per-bucket: `per_bucket_of` floors the rate at one both ways, because `sample / 0.0` is infinite, `as usize` saturates and the fold's `resize(bucket + 1)` is then a length that does not exist -- a panic in debug, a wrap and an out-of-bounds index in release. The window arithmetic is written in buckets *per second* off the same helper. Evidence (`cargo test -p engine --lib -- --test-threads=1 waveform::`): 16 passed, including a 40-minute FLAC whose envelope is 9.6M buckets (past the real ceiling): a window's buckets are the envelope's bucket for bucket and its frame is byte for byte the frame the whole envelope paints, the first ask decodes a window, and the three asks after it -- a drag, a new seat each time -- decode nothing at all.
🐛 fix(decode): grades survive a moved clip; a size-less canvas paints nothingAhmet Kaan Gümüş · 4826d31
🐛 fix(decode): grades survive a moved clip; a size-less canvas paints nothing - the graded copy applied the grade under `!passthrough` while the branch was entered under `!skip_placement && colour`, so a clip the size of the project moved, scaled or turned by a transform was converted ungraded after the placement: the graded and ungraded previews came back byte-identical (0.00 mean codes) while the export side, which applies the grade unconditionally, showed something else (57.02 codes apart). The application guard now matches the entry guard; the fused graded fast path for an untouched passthrough clip is unchanged. - the visualizer's zero line was indexed from the height (`h as isize - 1`), and `Ord::clamp(0, -1)` panics in every profile: a zero- or one-pixel-high canvas -- a `Composer::passthrough()` canvas is exactly `(0, 0)` -- killed the worker thread, closed the frame channel and left the span with no picture, which is what an export then aborts on. A canvas with no size now takes the empty picture it asked for, witnessed both directly and through the seat that opens one. - the empty-peaks panic the lane was chartered on is refuted, not papered over: `pair_at` and both of its `peaks.len() - 1` indexes sit inside `if !peaks.is_empty()` in the base tree, so no column can sample a bucket of an empty slice. The inherited witness expected one ink row where the trace paints a five-row band; it now pins the band's shape and that full-scale peaks paint a tall picture, which is what makes the flat line a claim about silence rather than about a painter that draws nothing. - a codec with no software seat that decoded nothing no longer leaves the backend cell claiming the hardware session that opened and produced nothing: that arm reports the gap it is. - the dead ink picker (`VIZ_HUE_SHIFT`, `viz_hue`, `with_viz_hue`, `viz_ink_rgb`) is deleted -- no caller anywhere in the tree, and its doc promised a nibble the field never carried -- along with the mangled doc line that landed mid-sentence between the peaks sentence and the `visualizer_i420` link.
2026-09-18
🐛 fix(media): audio routing, session audio re-arm, hw trailing-zero NALs, display-matrix rotationAhmet Kaan Gümüş · bc8b82e
🐛 fix(media): audio routing, session audio re-arm, hw trailing-zero NALs, display-matrix rotation - is_audio admits .mpeg/.mpg so mp3-with-cover files import (was fed to Mp4Demuxer) - session audio walks past trackless leading sources and re-arms when a sounding file joins a silent timeline (fixes add/remove/add silence) - engine-hw pump clears trailing cabac_zero_word bytes instead of dying with code -2; export falls back to software decode before first frame - tkhd display matrix read for mp4; 90/180/270 turns baked into preview and export pixels; other angles refused by name (UnsupportedRotation)
2026-09-17
⚡ perf(audio): the preview paints at its own size, not the project'sAhmet Kaan Gümüş · 62b680e
⚡ perf(audio): the preview paints at its own size, not the project's The visualizer rebuilt the picture at the project resolution (1920x1080) for a preview displayed at ~584x328, so every look edit paid 4-5x what it needed. `PlaybackSession::set_view_size`/`view_size` now feed every composer the playback path opens (span, dissolve-B, black) and the app pushes the Contain-fitted display box from a probe on the picture area, with an 8 px deadband so a resize drag does not thrash. The export keeps its own seat at the project resolution and is untouched. Ring, a test song, ms per painted frame, glow 2/4/8/12/16: 18.5/35.7/64.7/93.2/117.1 -> 5.7/5.9/9.6/12.9/15.9 "Save frame as PNG" would otherwise have followed the preview down to that size, so it now asks the seat for one frame at the project's own size and writes the PNG when it lands (keyed to the session that asked, with a 2 s bound), and the preview's size comes back on the next repaint. The painter's per-frame buffers (VizScratch) are owned by the painting thread: 27 Vecs a frame -> 8, and none on later frames.
2026-09-16
⚡ perf(audio): the glow pass paints a chain, not a disc per stepAhmet Kaan Gümüş · 905edda
⚡ perf(audio): the glow pass paints a chain, not a disc per step `viz_line` stamped a full disc at every Bresenham step of the ring/wave chain, so the cost grew as `steps * pi * glow^2`: on a 1920x1080 ring one painted frame cost 16 ms at glow 2 and 1152 ms at glow 16, which is the frame drop the glow stepper produced. `viz_chain` paints a whole chain per cell -- luma is a max and every cell of one chain shares one ink, so the nearest cell decides both planes -- with an exact lower-hull sweep for the nearest column, and the disc pass is kept verbatim and picked by a measured speed rule (the crossing is glow 3-4). A 16-row golden-hash test pins the painted bytes of both arms at 1920x1080. glow 2/4/9/16: 16/60/294/1152 -> 18/36/61/117 ms per painted frame.
⚡ perf(audio): the visualizer reads its envelope from a process memoAhmet Kaan Gümüş · dc551d7
⚡ perf(audio): the visualizer reads its envelope from a process memo A picture rebuild called `open_visualizer`, which decoded the whole file's audio envelope again -- ~51 ms of CPU, 598k buckets for a 150 s song -- so every look edit, and every sample of a wheel drag, paid a whole-file decode for an answer that had not changed. `waveform::peaks_shared` memoises it by the file's own stat (path, stream, buckets, length, mtime), bounded in buckets; the envelope fed to the painter is the same value as before. The user's "dragging causes frame drop" was that decode on the frame path: rebuild latency p50 68 -> 6-18 ms, playing frame interval p95 80 -> 48 ms, frames over 50 ms 32/438 -> 1/496. The wheel's own 720-polygon repaint measured ~0.9 ms and the engine write's UI-thread share ~42 us, so neither was touched.
✨ feat(audio): the waveform look carries a strand colour, and a hex/rgb doorAhmet Kaan Gümüş · 1973da2
✨ feat(audio): the waveform look carries a strand colour, and a hex/rgb door viz_paint widens to one packed u64: hue/sat/strands/glow in the low bytes exactly as v22 wrote them, the strand's own hue and sat above, and bit 63 saying the strand colour was chosen rather than left to the +128 complement. Dialect v23. viz_color_hex/viz_color_from_text read and write the colour a person would type. set_viz_paint_live joins its colour/transform/speed twins so a drag is one undo step.
2026-09-15
🐛 fix(audio): ring uses the picked colour; glow 0 is 0; HSV diskAhmet Kaan Gümüş · 2ad667f
🐛 fix(audio): ring uses the picked colour; glow 0 is 0; HSV disk One strand was always the opposite hue (`0 < 1/2`). Glow on Ring never stamped. Glow 1 then − wrote the unset sentinel and showed 2. Wheel is a sat×hue disk; Sat row is gone (radius is sat).
✨ feat(audio): HSV wheel, real glow, fixed-length windowAhmet Kaan Gümüş · 20ec2e7
✨ feat(audio): HSV wheel, real glow, fixed-length window Colour is a standard HSV wheel (0° red at top, radius = sat). Glow now expands the stroke. The 2s view no longer shrinks at file edges, which was stretching a bump as it entered.
✨ feat(audio): stable envelope height, full hue/sat, strands and glowAhmet Kaan Gümüş · 7ebfc44
✨ feat(audio): stable envelope height, full hue/sat, strands and glow The 2s window no longer rescales to its own peak, so a bump keeps its height as it enters and leaves. Colour is a 64-stop hue bar plus sat (white→full). Strands and glow go from one line to the dense ring. Packed on Clip.viz_paint; dialect v22.
✨ feat(audio): timeline-smooth fill default, ring look, azure inkAhmet Kaan Gümüş · 92b906f
✨ feat(audio): timeline-smooth fill default, ring look, azure ink Default visualizer is the lane envelope (fold + smooth + fill) in #4F8FD6, not a signed-peak scribble. CLIP adds Ring (polar strands). Ribbon stays the linear flowing look. Colour 0 is that azure.
✨ feat(audio): Audacity trace, ribbon, fill — colour is a pickerAhmet Kaan Gümüş · 70a02fb
✨ feat(audio): Audacity trace, ribbon, fill — colour is a picker Visualizer default is a signed-peak polyline (the Audacity line), not the filled 60 Hz bars. CLIP tab picks Waveform / Ribbon / Fill, Fast zooms to 0.2s, and colour is 16 swatches + steppers.
2026-09-14
✨ feat(audio): waveform styles, any soundtrack, keys search, group on the clip menuAhmet Kaan Gümüş · dfcec06
✨ feat(audio): waveform styles, any soundtrack, keys search, group on the clip menu Visualizer is no longer wav-only: h on a video clip with sound paints that file's soundtrack. Style bits live on the clip (outline, smooth, fast, colour) and toggle from CLIP. `?` type-to-filters the keys list. Group / Ungroup / Regroup are clip-menu rows, not chords-only.
✨ feat(audio): create a waveform visualizer as a video clipAhmet Kaan Gümüş · 735b90e
✨ feat(audio): create a waveform visualizer as a video clip Select an audio clip and press h (or the clip menu). The sound's envelope is painted as a sliding mirrored waveform onto a video lane, so preview and export both show it. Paste still never drops a song on V1.
2026-09-12
♻️ refactor(engine-hw): the VP8 decode seat is ec-vp8 native -- libvpx and its hand-written FFI are deleted, the plugin links the decoder as ordinary Rust (56 ec_vp8 symbols, no DT_NEEDED, no dlopen); VpxSession keeps its five-verb boundary (init/decode/flush/get_frame, destroy now the drop of an owned decoder) and everything above it is untouched; CAP_VP8 lights unconditionally and still never reads as a GPU seat; A/B byte-exact against the libvpx seat on the 1280x720 fixture (60/60 frames), the 2560x1321 odd-size webm (270/270) and a two-pass auto-altref stream (90/90 shown, 6 hidden produce none, seek landings identical); vp8 twins 4/4, capability_matrix+backends+caps green, --all-targets 0 warningsAhmet Kaan Gümüş · 36bd0e7
♻️ refactor(engine-hw): the VP8 decode seat is ec-vp8 native -- libvpx and its hand-written FFI are deleted, the plugin links the decoder as ordinary Rust (56 ec_vp8 symbols, no DT_NEEDED, no dlopen); VpxSession keeps its five-verb boundary (init/decode/flush/get_frame, destroy now the drop of an owned decoder) and everything above it is untouched; CAP_VP8 lights unconditionally and still never reads as a GPU seat; A/B byte-exact against the libvpx seat on the 1280x720 fixture (60/60 frames), the 2560x1321 odd-size webm (270/270) and a two-pass auto-altref stream (90/90 shown, 6 hidden produce none, seek landings identical); vp8 twins 4/4, capability_matrix+backends+caps green, --all-targets 0 warnings
✨ feat(engine): a native AV1 decode seat — ec-av1 takes AV1 sources with no plugin in the roomAhmet Kaan Gümüş · 875b31a
✨ feat(engine): a native AV1 decode seat — ec-av1 takes AV1 sources with no plugin in the room The software arm of decode.rs grows a second seat beside ec-h264: probe(), open_worker()'s plugin gate and run_span() all take Codec::Av1 as a software-covered codec, falling back to ec-av1 exactly where H.264 falls back to ec-h264. VE_SW=1 pins it, Backend::Software reports it. The seat feeds ec-av1's whole-stream door the way the demuxer assembles AV1 anyway: access units from the landing sync sample to the next one are one chunk (the sequence header the demuxer injects ahead of every sync sample is the boundary marker), and each chunk is a legal random-access stream that decodes to its end — so hidden reference frames drain and the reorder tail lands. A span stops decoding at its last asked-for picture via a sink Eof sentinel; a refusal out of ec-av1 fails the span in words mid-film, the pictures decoded so far standing, never garbage. u16 planes narrow at the seat: 0..=255 casts, 10-bit downshifts by two — the same truncation the plugin's P010 read-back performs, so both seats hand the renderer byte-identical planes. Witnesses: plugin vs seat frame-for-frame byte-exact on test_av1.mkv and on the 10-bit twin (frame 30, 0 differing bytes both); seek-landing equals linear on the software seat across a keyframe interval; a crafted broken-GOP file (keyframe-flagged inter frame) is refused by name — "no saved CDF state" — with the first GOP standing and the channel closing clean. Perf (release, funnel incl. demux+convert, identical config both sides): VA-API 2.0x the seat on 720p8 (100 vs 51 fps), 1.8x on 720p10 (95 vs 53), 4.9x on a 1920x792 10-bit film (199 vs 41 fps, seat 1.70x realtime), 3.5x on a 3840x1608 10-bit film (22 vs 6.2 fps, seat 0.26x realtime — below 1x, but so is the plugin's own 0.92x there: the BGRA conversion dominates that funnel). 1.70x realtime at 1080p-class clears the threads-wiring bar, so EC_AV1_THREADS stays opt-in. demux::needs_plugin's AV1 arm now names the export path (whose software decoder stays H.264-only) instead of claiming no software decoder exists; bit_depth()'s doc gains its second reader.
Merge branch 'lane-h264-swap' (e24fe61): the software H264 decode seat is ec-h264 native via the ec_core registry -- and the seat now emits true DISPLAY order (the rusty corner-cut scrambled B-picture content); byte-exact vs rusty on CAVLC and CABAC+B fixtures, perf 1.02-1.57x on the gate classes, 0.80x on B-frame CABAC (the DPB reorder price; lane-ech264-perf queued); rusty_h264 stays for the ENCODE seat onlyAhmet Kaan Gümüş · c612711
Merge branch 'lane-h264-swap' (e24fe61): the software H264 decode seat is ec-h264 native via the ec_core registry -- and the seat now emits true DISPLAY order (the rusty corner-cut scrambled B-picture content); byte-exact vs rusty on CAVLC and CABAC+B fixtures, perf 1.02-1.57x on the gate classes, 0.80x on B-frame CABAC (the DPB reorder price; lane-ech264-perf queued); rusty_h264 stays for the ENCODE seat only # Conflicts: # Cargo.lock # crates/engine/Cargo.toml # crates/engine/src/decode.rs # crates/engine/src/demux.rs
♻️ refactor(engine): the software H.264 seat decodes with ec-h264Ahmet Kaan Gümüş · e24fe61
♻️ refactor(engine): the software H.264 seat decodes with ec-h264
decode::run leaves `rusty_h264` for `ec_h264::H264Decoder` (path dep on
../../edith_codecs, `ec_core` beside it for the registry contract):
packets in over the demuxer's Annex-B access units, frames out through
send_packet/receive_frame with a flush at end of stream so the reorder
delay releases its tail.
Semantics: the old loop emitted pictures in decode order and counted
access units -- a corner-cut that only held for Baseline, and scrambled
exactly the B-picture streams it could not reorder. ec-h264 bumps the
DPB (clause C.4.5.3) and hands pictures back in display order, so the
landing index the demuxer's seek reports and the label each frame ships
with now count the same thing: timeline positions, which the transport,
skip_for_speed and the hardware backend already assumed. Witnessed on
test_high.mp4 (B pictures): the seat delivers 0..150 in order where the
old seat delivered the same frames reshuffled and mislabelled.
Tests: tests/sw_backends.rs is the byte-exactness witness -- ec-h264
against rusty_h264 (kept as the independent oracle) on CAVLC Baseline
and CABAC High fixtures, decode order per position and display order as
a multiset, with the reorder engaged only where the stream reorders;
hw_decode's software halves (seek_matches_linear, range_stops_at_end,
hardware_matches_software_on_frame_30) pass against the VA-API backend.
Throughput (raw demux+decode, idle machine, best of three): 1.52x
rusty_h264 on a 1080p Main export and 1.57x on a 4K Main render, 1.02x
on a 1440p High screen recording, 1.17x on CAVLC Baseline; 0.80-0.81x
on the two B-picture CABAC streams measured -- the measured price of
the full DPB the old seat skipped. cargo check -p engine: 0 warnings.
rusty_h264 stays linked for the export encode seat (Encoder,
EncoderConfig, Preset, YuvFrame) and export's own SwDecoder, so the
dep, the rusty_h264-common vendored patch (the rusty_alloc
global_allocator landmine) and their Cargo.lock entries are load-bearing
until that seat moves to ec_h264::Encoder; caps names the split honestly
('ec-h264 / rusty_h264').✨ feat(engine): software VP8 decode via dlopen'd libvpx seat in the pluginAhmet Kaan Gümüş · ba33df0
✨ feat(engine): software VP8 decode via dlopen'd libvpx seat in the plugin
VP8 was refused by a stale UNSUPPORTED claim ('no VP8 decoder'); the
vendored cros-codecs VP8 decoder is VA-API-only and the test GPU
exposes no VP8 VA-API profile, so the real seat is software: libvpx.so.9
dlopen'd inside libengine_hw.so (vpx.rs), routed before any GPU device
opens, seek = destroy+re-init on the demuxer's keyframe contract,
CAP_VP8 reported as the plugin's seat. Codec::Vp8 plumbed through
demux (V_VP8 + mp4 vp08), colorspace, refusals; export UI gains a
truthful read-only VP8 row; test_vp8.{webm,mp4} fixtures + capability
row + tests/vp8.rs decode/export twins. Verified by the authoring
session: headless playloop 270 frames 0 dropped, 50/50 seeks, live
harness-driven UI playback, cross-provider review PASS (FFI layouts
against shipped libvpx DWARF, valgrind-clean).2026-08-20
🐛 fix(engine): a picture edit reuses the decoder instead of reopening the fileAhmet Kaan Gümüş · 91e6316
🐛 fix(engine): a picture edit reuses the decoder instead of reopening the file The session's first worker was seeded with the raw caller path while the project canonicalizes every source, so Worker::reseek's textual path check failed and every colour or transform nudge paid a full thread + demux + VA-API reopen (~11s on a big file) instead of a seek. open_stream canonicalizes once, and the idle teardown stretches 2s→8s so think-time between nudges keeps the hardware session warm.
2026-08-19
🐛 fix(engine): the deferred-open test stops racing a thread spawnAhmet Kaan Gümüş · 77c6364
🐛 fix(engine): the deferred-open test stops racing a thread spawn Under a loaded machine the spawn a deferred open pays can cost more wall clock than a sync demux of a small fixture; the remaining two asserts pin the deferral invariant without the race. Flaked 1-in-3 during parallel builds.
🐛 fix(engine): the late-drop escape valve survives the speed skipAhmet Kaan Gümüş · 43ff2f2
🐛 fix(engine): the late-drop escape valve survives the speed skip
run() and run_hw() checked abort.late(due) && skipped < LATE_RUN as one
condition, so once LATE_RUN pictures in a row had been dropped for
lateness, the branch fell through to skip_for_speed -- and if that also
said skip (which it does on every other frame at >1x), the escape valve
that is supposed to guarantee one picture in LATE_RUN reaches the screen
never fired. A machine falling behind at speed could go fully silent.
Reordered so lateness is decided first and completely: still-within-run
skips for being late, past-run sends unconditionally (skipped=0), and
skip_for_speed only gets a say once lateness has already said "send".
Measured with a throwaway probe (deleted) against two real files, SW
decode (this box has no HW decode path), 15s per run, same machine
before/after:
a large 4K H.264 mp4 (the falling-behind, worst-case class the
escape valve exists for):
1.0x 219->322 shown, 5->2 resyncs, p99 1131.8ms->75.8ms
1.5x 173->165 shown, 7->7 resyncs, p99 1049.6ms->1113.4ms (noise)
2.0x 134->141 shown, 7->7 resyncs, p99 1055.7ms->970.6ms
a small screen-recording mp4 (keeps up, never hits abort.late): 0
resyncs before and after at all three speeds, numbers unchanged --
the reorder does not touch a file that was never late.
Net: better or a wash everywhere measured, no regression on the class
the bug actually bites.
Adds a deterministic unit test for skip_for_speed's alternation at 2x
and its never-skip guarantee on a span's last frame.2026-08-13
🐛 fix(decode): the queue a file opens with, and the driver a parked worker holdsAhmet Kaan Gümüş · 7985bd5
🐛 fix(decode): the queue a file opens with, and the driver a parked worker holds Five findings from the lane's verification, in the order they bite. DEPTH NEVER ENGAGED ON THE PRIMARY PATH. Every session opens its first worker pass-through -- a freshly opened file *is* the project resolution -- and a pass-through canvas cannot say how big the pictures will be, so it answered 2: the bound this engine had before there was any decode-ahead. A whole file played at that depth until the first seek built a real canvas. The depth now comes from the stream the sync opener already read (`scale::queue_depth`), and a paused burst off a freshly opened 720p file is 17 pictures where it was 3. A PARKED WORKER NO LONGER HOLDS THE DRIVER. The thread that outlives its span used to park on its command channel with the VA-API session open, which widened the Mesa `atexit` window from "quit during a decode" to "quit any time after opening a file". The wait is in two halves now: the fast one keeps everything, so a seek, a scrub step and a clip boundary still find the decoder where they left it, and past two seconds idle the hardware session is closed. The demuxer stays -- it is a file handle and an index, not driver state, and it is what costs seconds to rebuild. DENSITY IS BOUNDED AGAIN. The suite's pump had been weakened to "indices increase", which a one-in-N delivery regression passes. It asserts contiguity again -- every session there is a pull consumer, owed every frame -- and a new test holds a *watched* session to the same contiguity plus a density floor whenever the decoder is measurably keeping up. The queue-depth doc now states the measured numbers (16 at 720p, 12 at 1080p, 3 at 3840x2160, 2 at 4096x2160; a burst is depth + 1), and two comments that still said "cancelled" for what a seek now abandons, and claimed the drop replaced the front-end's resync, are corrected: both mechanisms are live and the drop is the first line.
⚡ perf(decode): the queue runs deeper and stops carrying pictures nobody can seeAhmet Kaan Gümüş · fffcda0
⚡ perf(decode): the queue runs deeper and stops carrying pictures nobody can see Two frames of decode-ahead was the whole buffer, so any hiccup emptied it and the decoder could never build a lead. The bound is now a budget in bytes (~96 MB: eleven 1080p pictures, two 4K ones), which is what makes the second half safe: a deeper queue full of stale pictures would be worse than a shallow one, so the worker is told where the playhead stands and stops paying the conversion and the queue slot for anything already behind it. The policy has a floor of its own. A machine that cannot decode in real time is late on every picture, and dropping every picture is a black screen rather than a stutter, so one in nine is handed over regardless -- roughly what the front-end's restart-every-two-seconds produced, without the VA-API init each restart cost. Off unless a caller says it is watching in real time: an export, the file-level API and a test draining as fast as it can each asked for a range of frames and are owed every one of them. The window turns it on, where `Player::pump` was already taking those pictures off the channel and throwing them away one repaint later. The playback suite's own pump asserted contiguous indices; it now asserts increasing ones, which is the invariant that survives a drop -- nothing out of order, nothing twice.
⚡ perf(decode): the worker that decoded a span stays for the next oneAhmet Kaan Gümüş · bbdd4d6
⚡ perf(decode): the worker that decoded a span stays for the next one A seek used to cost a thread, a container parse and a VA-API initialisation (98 ms measured worst case) before it could decode a single picture, because every span opened a decoder of its own and threw it away again. The worker now outlives its span: it parks on a command channel, and a seek onto the file it already has open reaches it through Worker::reseek -- a demuxer seek and a decoder flush, 1-4 ms measured against a 28-37 ms open of the same file warm. The plugin learns the same trick from the other side: vh_seek repositions an open session exactly as vh_open_at positions a new one, and it is an optional symbol, so a plugin built before it still decodes and its caller simply opens a session per seek as it always did. Cancelling and abandoning become two different things: a seek abandons the span (the thread, the file and the decoder stay), a replacement cancels the worker (the thread ends, and the command channel goes with it, so nothing parks in recv past the session that owns it and no VA-API session meets Mesa's atexit).
chore: rename ponytail: comment marker to corner-cut:Ahmet Kaan Gümüş · 9ba8e0a
chore: rename ponytail: comment marker to corner-cut: Marker convention renamed after uninstalling the ponytail plugin; semantics unchanged (deliberate corner-cut, known ceiling + upgrade path). Token-only rename, 81 comment lines, no code change.
🐛 fix(decode): a seek into an open GOP is hardware's to finishAhmet Kaan Gümüş · 7652ada
🐛 fix(decode): a seek into an open GOP is hardware's to finish A Blu-ray remux codes its GOPs open: the I picture that opens one is stored ahead of the leading pictures that are *shown* before it, and those reference the GOP before. Restart decoding at that random access point -- which is what every seek, scrub and clip boundary does -- and the leading pictures have references nobody decoded, so the plugin failed its first frame, playback fell back to `rusty_h264`, and that decoder died on the file's I_PCM macroblocks. Seventeen of twenty scrub steps on a 5.27 GB AVC remux ended with no picture at all, and the three that survived cost 482 ms each in software. The pictures are not ours to show, so they are dropped and the decode walks on (bounded by `LEADING_LIMIT`, and only for a session that was positioned somewhere other than the file's own start). The refusal that the tolerance would otherwise swallow is kept at both ends: a stream read from frame 0 is still refused the moment its first picture will not decode, and the plugin probe now counts an immediate end of stream as a refusal rather than a pass -- a session that hands back no picture is the black-frame-and-instant-eof the probe exists to catch. The vendored H.264 decoder's own refusal goes with it: it failed a `frame_num` gap outright unless the stream declared gaps allowed, which is exactly the wrong reading here -- the gap is the editor's, made by starting in the middle of a film, and §8.2.5.2's non-existing frames are what stands in for it. The loop that builds them was already there, behind that flag. Twenty of twenty scrub steps on the remux now decode in hardware, 77 ms median against 482 ms; `seek_matches_linear_every_container` holds for every container, and `dump_frame <file> <n> <out> seek` is what a picture reached by a seek can be compared with the same picture reached by decoding from the start.
2026-08-12
🐛 fix(decode): a 4K wavefront HEVC is 33 entry points, not 32Ahmet Kaan Gümüş · 65ea910
🐛 fix(decode): a 4K wavefront HEVC is 33 entry points, not 32 A 4K wavefront HEVC film (3840x2160, CTB 64, entropy_coding_sync) writes num_entry_point_offsets = 33 in every slice header -- exactly PicHeightInCtbsY - 1, which is what ITU-T H.265 §7.4.7.1 allows -- and the vendored parser kept them in a [u32; 32]. The 33rd panicked, the plugin edge caught it, and the user got a black picture and an instant eof. The list is now sized by the stream. Same shape swept through the rest of the h265 parser, where a parsed count could outrun a fixed array: tile columns/rows (the CTB grid allows far more than the 19/21 the VA-API picture parameter holds), the long-term ref pic block, and sps/vps_max_sub_layers_minus1, which u(3) can read as 7 into 7-long arrays. Those refuse by name instead. And the door now asks the plugin for one picture before it lets a file in: a session that opens and then decodes nothing was the black screen with no explanation, so it is refused in its own words rather than in the missing-plugin ones.
2026-08-11
⚡ perf(playback): a seek costs the UI thread a thread spawn, not a demuxAhmet Kaan Gümüş · 74a068e
⚡ perf(playback): a seek costs the UI thread a thread spawn, not a demux Playback opened every span's file on the caller's thread: 300 ms warm on a 25 GB film (measured), seconds off a cold cache, and a scrub paid it per seek. `DecodeSession::open_worker_deferred` moves the demux onto the worker -- there is no metadata to hand back on that path anyway, `start_span` discarded it -- so the caller pays a `thread::spawn` and the picture arrives when it arrives, which is what `try_frame`'s `None` has always meant. The four callers that need the refusal at the door (the public `open`, a session open, a project load, an import) keep the sync opener, so a file this machine cannot decode is still named to the user where it is chosen. A file that fails to open *at a span* drops its sender, and the disconnected receiver walks the session on to the next span exactly as the dead receiver installed here did. Both openers now share one worker body (`decode_span`), so hardware fallback, the codec refusal, the tone map's declared peak and the range clamp cannot drift apart between them. Measured on the film: seek returns in 52-68 us (was ~300 ms), first frame 380-620 ms later. The remaining wait is the container walk on the worker; a per-source parsed-index cache is the follow-up, not this diff.
✨ feat(tonemap): the reference rendition converts a film at the peak the film declaresAhmet Kaan Gümüş · 27097e2
✨ feat(tonemap): the reference rendition converts a film at the peak the film declares `Demuxer::light().peak()` -- a stream's MaxCLL, or its mastering display's maximum -- has been read at every open and dropped on the floor. It now reaches `ToneMapper::new` as `declared_peak`, and `Preset::master_nits_for` is the whole composition rule: `Reference` takes the film's number (1000 stays the fallback for a file that declared nothing), `Standard` and `Vivid` keep their fixed 400 and 250, because a picked exposure that moved per file would not be a pick. One HDR film declares 1759 cd/m^2, so its 1000-nit highlights land at SDR 215 instead of clipping at white, and BT.2408 diffuse white at 145 instead of 166. Both sites that build a table have the demuxer in hand already, so nothing is promoted through `VideoMeta`: the decode funnel reads it before the worker takes the demuxer, and `source_rate` returns it off the header parse export already did -- which is what keeps preview and export on one number. A declared peak is a stranger's number and is checked before it becomes a divisor: outside 100..=10000, or a NaN, is treated as not declared. test_hdr_bright.mkv joins the fixtures for it -- the older HDR metadata ones all say 1000, which no picture can tell apart from the fallback.
✨ feat(tonemap): the HDR rendition is a row you pick, not a constant someone chose for youAhmet Kaan Gümüş · 09671f7
✨ feat(tonemap): the HDR rendition is a row you pick, not a constant someone chose for you BT.2446 Method A's assumed mastering peak was a constant in the module: 400 cd/m^2, one exposure decided for everybody. It is a matter of taste, not of correctness -- a reference rendition and a vivid one are both honest pictures of the same film -- so it becomes a project setting with three renditions through the very same curve, which is what keeps the hues right whichever is picked: Reference 1000 nits, chroma 1.0 the published conversion (diffuse white 166) Standard 400 nits, chroma 1.0 display-referred, as bright as a player Vivid 250 nits, chroma 1.10 brightest, and a tenth more colour The chroma gain is a scale about 128 in the SDR codes, after the map and clamped to the legal range: a grey stays exactly grey at any gain, and at 1.0 it is a clamp the maths cannot reach, so the other two presets are byte for byte what Method A produced. HLG's OOTF gain is guarded at black -- below a 1000 cd/m^2 peak the system gamma is under 1, and the 0 * inf that follows byte-cast to 0 and put a hole where black belongs. The preset lives on the Project beside the limiter (a setting, not an undo step), reaches the decode workers and the export through the same value, and is saved as a `tonemap` line in edith 11 -- left out when it is the default, so a project holding no HDR media is the bytes it was, and a v10 file loads as the reference rendition, which is the only one it ever had. Picking one rebuilds the picture under the playhead the way a resize does; an SDR project is unmoved. The panel names it beside the resolution and the rate -- the third thing that is the project's rather than the media's -- and a click opens the three renditions with the one in force marked. No stroke: this is a list to look at.
✨ feat(color): an HDR film reaches the window tone-mapped, and an SDR one is untouchedAhmet Kaan Gümüş · f8dea1c
✨ feat(color): an HDR film reaches the window tone-mapped, and an SDR one is untouched The tone map existed and nothing called it: a PQ or HLG stream was converted with its own matrix and then shown as if its curve were SDR -- flat, grey-washed, half the brightness a player gives it. `Render` now builds one `ToneMapper` per stream (the transfer is a property of the file, and the LUT is float work over 9 537 nodes) and maps the source planes into BT.709 SDR before anything else looks at them, in both branches of the funnel: the fused passthrough conversion and the graded-then-placed one. The grade lands *after* the map, on the one scratch copy the placed path already made -- a look means what it says in the SDR a viewer is shown, not in the ten stops the file was in. An SDR stream takes neither the copy nor the map and is byte for byte the picture it was, asserted against hashes measured before this change (`tonemap_render`). `MASTER_NITS` is 400, not the 1000 an HDR10 grade is mastered to. Told 1000, BT.2446 Method A puts 203-nit diffuse white on code 166, which reads as broadcast-dark; told 400 it lands on 205, which is the brightness mpv shows. The anchor tests carry the recomputed codes rather than wider tolerances, and HLG's OOTF now follows the assumed peak through BT.2100's own log term -- its relative diffuse white is 19% of whatever peak the display has, so it comes out at 170 and no longer agrees with PQ's absolute 203, which is the standard's behaviour and is written down beside the assert. Measured on the real 4K HDR10 film (`hw_decode`, existence-gated): frame 3000 saturation 34.8 -> 98.9, mean luma 107.6 -> 122.2, and 32.5 ms/frame for the map plus the conversion at 3840x1600, inside the 39 ms budget. New fixture `test_pq.mp4`: four flat patches whose codes are written into the planes by hand, so a test names the code it feeds and the code it expects back.
✨ feat(colorspace): a picture is converted in the matrix its own file names, not in BT.601Ahmet Kaan Gümüş · 55b1c8d
✨ feat(colorspace): a picture is converted in the matrix its own file names, not in BT.601 Every displayed frame went through one hardcoded integer matrix -- BT.601 limited, 298/409/-100/-208/516 -- whatever the stream said it was. An HD or UHD file read that way shifts: BT.709's red weight is 0.2126 against 0.601's 0.299, which is a visible cast on faces and saturated colour. The two converters now take the `ColorDescription` the demuxers already resolved, and derive their 8.8 coefficients from that matrix's two luma weights and its range once per frame, so the pixel loop is the same multiply-and-shift it was. BT.601 limited rounds to exactly the integers that were hardcoded, so SD material is byte for byte the picture it always was. Stills keep BT.601 on purpose: `rgb_to_i420` writes them in it, and the pair round-trips. Transfer curves are untouched -- a PQ or HLG stream gets the BT.2020 matrix and is still shown as SDR, with the seam marked.
✨ feat(engine): an edit rebuilds what it dirtied, and nothing elseAhmet Kaan Gümüş · c2e62a3
✨ feat(engine): an edit rebuilds what it dirtied, and nothing else Every param change went through one funnel -- edit() -> seek() -- which flushed the audio ring, reopened every track, respawned the feeder and rebuilt the video decoder. Dragging a colour slider therefore cut the sound ~40 times across one gesture, and every restart re-anchored the clock onto an empty ring, so the silence of the restart was counted as timeline time: a permanent A/V offset, re-rolled by every edit made while playing (the resolution-change desync). Edits are classified by what they dirty now. A grade, a fit policy and the project resolution rebuild the picture where it stands and never touch a sample. An equalizer rebuilds the sound and never touches the picture. A fader and the master ceiling rebuild nothing at all: they live at the mix sum, so the running mixer picks them up between two blocks (MixControls), and the limiter is retuned rather than restarted so its delay line -- and the sample count the master clock is made of -- keeps running. Only a structural edit still reseeks both halves. And a restart no longer costs an offset: the feeder stamps the device position its first real sample was queued at, and the clock anchors there instead of on the first poll after the seek, so the silence before the content is never timeline time. Also: a span whose source will not open no longer presents the old channel's frames under the new mapping, and the feeder stops parking 10 ms on a ring that is merely waiting out a flush.
✨ feat(backends): the decoder and the encoder say which one is runningAhmet Kaan Gümüş · bdcc2fb
✨ feat(backends): the decoder and the encoder say which one is running A source names its decoder in the library row before anything plays, the transport line names the running one while it does, and the export card names the encoders it would open before the button — the progress line naming the ones it did. Every answer is measured, never promised: `decode::probe` picks a seat by the very rules `open_worker` picks one, the worker publishes what it actually opened (so a hardware session that falls back to software says so), and `export::planned_video` opens the very VA-API encoder the export would and closes it again. `hw_seat` is now the single place that choice is made, so a card and a running job cannot drift apart.
2026-08-10
🐛 fix(timeline): a pasted still never lands on the audio laneAhmet Kaan Gümüş · b586b85
🐛 fix(timeline): a pasted still never lands on the audio lane `Project::paste` routed by `is_audio` alone, so a *copied* still clip -- the one door that does not go through `place_stream_at` -- was pasted as a grouped take across `V1` and `A1`. The A1 half is a PNG the audio worker demuxes: "file contains a box with a larger size than it", which silences the whole session rather than that clip, and the save it writes is one `open_project` then refuses by name. An `is_image` arm mirrors the audio-only one. Same-shape sweep of every clip-level door that routes by source kind: - `Project::paste` (project.rs) -- this defect, fixed. - `PlaybackSession::place_stream_at` -- already routed, image arm returns on the video lane before the audio fork. - `PlaybackSession::open`/`open_project` -- both directions refused by name at load. - `Project::move_to_lane` -- refuses a move across kinds, so no clip can cross by drag. Clean. - `Project::place`, `split`, `regroup`, `lift`, `delete_in`, `trim` -- the caller names the lane or the lane never changes. Clean, and the loader is the backstop for a hand-written file either way. - `Player::insert_source` (app) -- guarded both ways already. Falsification: with the `(_, true) => &[LaneKind::Video]` arm removed the new test fails at the lane count (A1 1 -> 2), and with that assertion lifted it fails on the WAV export with the demux error above -- the two consequences the test names, both reachable. Two doc corrections found with it: `Still::open` now says alpha is dropped by `to_rgb8` (a transparent PNG lands opaque, with the blend as the ponytail), and `first_audio_of` no longer implies an image-first timeline accepts a later audio import -- it widens which source is asked, not what "the timeline is silent" means. tests: images 7/7 (new `pasting_a_copied_still_never_reaches_the_audio_lane` asserts no A1 clip, no audio clip from a picture, the WAV export still carries the sound, and the save reopens), engine lib 155, saveload 12, audio_files 16, lanes 5 (serial), bin 56.
✨ feat(timeline): still images import and place as clipsAhmet Kaan Gümüş · 30d430d
✨ feat(timeline): still images import and place as clips A PNG, JPEG or WebP is a source like any other: it imports into the library, drags onto a video lane, shows at the playhead, trims, saves and exports. `engine::is_image` is the door, beside `is_audio`, and every choice it forces is made in one place. The decisions, spelled out: - Extensions: png, jpg, jpeg, webp -- exactly what the `image` crate is built with here. Anything else is refused by the door that refuses a .txt. - Length: an image has none, so it is *held to* ten minutes (600 s at the timeline's rate) and *placed* at five seconds. The cap is finite on purpose -- a u32::MAX sentinel would hand a trim drag a wall past anything the timeline can hold -- and it is recomputed identically at load, so a clip trimmed out to it reopens. - Image-first project: its own picture is the canvas (a still *has* a resolution, unlike a song) at 30 fps, silent, one 5 s clip on V1. The A2 audio-only precedent for everything else. - Scaling: none of its own. The still is decoded once to I420 and goes through the same grade, the same `Composer` and the same conversion a decoded picture does, so a 640x360 image on a 1280x720 canvas is letterboxed by its fit policy and never stretched. - Lanes: the mirror of a song. A still goes on the video lane it was asked for or on V1, never on an audio one, and never as a grouped take -- a clip on A1 playing a PNG is a segment the audio worker cannot open. Hand-written projects are refused by name. - The timeline's audio parameters are now the first source that *could* have any, so an image as source 0 no longer holds every later import to its silence. Playback opens a still worker (one conversion, then a memcpy per frame, as the black-gap worker does); the export's `ClipDecoder` hands the same planes out for as long as the span runs, so a mixed video/still timeline encodes at the cut. tests: engine/tests/images.rs -- import registers only, placed pixels match the file's own (top/bottom bands catch a flip, RGB order catches a swap), trim walls at the cap, .edith round trip incl. the audio-lane refusal, mp4 export pixel-checked at the cut, audio-lane placement lands on V1. Fixture: scripts/gen_fixtures.sh writes assets/test_still.png.
✨ feat(engine): project resolution stands apart from media resolutionAhmet Kaan Gümüş · 19e294a
✨ feat(engine): project resolution stands apart from media resolution A timeline had one resolution because its first source did: import refused anything else by name, and there was nowhere to say otherwise. A project now carries its own picture size and every clip is composed onto it, so media of different resolutions share a timeline the way they do in any editor. * scale::Composer is the one definition of that composition -- fit_rect, scale_i420, compose_i420 onto a black canvas -- and both playback and export call it, so what is written is what was watched. A canvas of the picture's own size is a pass-through that allocates nothing and touches no byte. * Grade first, place second: a grade belongs to the clip's pixels at the resolution they were shot at, and the letterbox bars are not the clip. * Per-clip fit policy (fit/fill/stretch/centre), one byte inline in Clip -- it lands in padding the clip already had. * .edith v7: a `resolution <w> <h>` line and a fit word per clip line. v6..v1 still load, defaulting to source 0's picture and Fit, which is what those projects always meant. * The fps refusal stays: mixing frame rates is resampling the timeline, a different problem, and a refusal is the honest answer until it is solved. * UI: `p` cycles the fit policy of the clip on screen (and a clip-menu item), ctrl+r cycles the project resolution through the usual sizes with the media's own among them, and the export card says which size it writes.
✨ feat(video): per-clip color grade is live in render and exportAhmet Kaan Gümüş · bd89527
✨ feat(video): per-clip color grade is live in render and export The grade a clip carries now reaches the picture. `Project::composite_clip_at` names the clip the composite shows at a frame and `composite_color_at` its grade, so playback's decode worker (folded into `i420_to_bgra_with`, free in the loop that was reading those samples anyway) and the export's encoder (onto per-span scratch, since the planes are borrowed) grade from one answer. `PlaybackSession::set_color` is an edit like any other, so it reseeks -- which is what repaints the frame already on screen, paused or playing. The card: `k` (or the clip menu's Colour…) opens four sliders on the selected video clip, or on the clip under the playhead when nothing is selected, so it is reachable with no pointer at all. Arrows pick and move a slider, r resets, esc closes; a slider walked back to the middle takes the grade off, which keeps an ungraded project byte-identical -- verified: the same two-clip export before and after this slice is md5 98522c19cefac2f7851b51de6416a493 both times.
✨ feat(engine): HEVC import via the VA-API pluginAhmet Kaan Gümüş · 85c152d
✨ feat(engine): HEVC import via the VA-API plugin The demuxer takes a hev1 track alongside avc1 and vp09. Its parameter sets are read out of the file by hand: mp4 0.14 reads one byte of hvcC and skips the rest, so the VPS, SPS and PPS an HEVC decoder cannot start without are unreachable through the crate. A small ISO-BMFF walk finds the track's hvcC and the record gives both the parameter sets and the NAL length prefix width -- the avcC one is now read the same way instead of assumed to be four bytes, which is one hardcoded guess less on the H.264 path too. Samples are repacked to Annex-B exactly as H.264's are, parameter sets ahead of every sync sample, because a hardware decoder that joins the stream at a seek has nothing else to configure itself from. Main 10 is refused at open by name: the plugin's NV12 pool and its vaGetImage read-back are 8-bit, and a 10-bit stream decoded into them would be garbage shown as a picture rather than an honest no. Same reasoning as the software refusal, which is now one message shared by every codec that has no software decoder at all. The C ABI is unchanged again: the plugin demuxes the file it is given, so an older libengine_hw.so still loads, still decodes H.264, and simply returns null for an HEVC path.
✨ feat(engine): VP9 import via the VA-API pluginAhmet Kaan Gümüş · 03a34d3
✨ feat(engine): VP9 import via the VA-API plugin The demuxer takes a vp09 track alongside avc1 and hands its samples through untouched -- an mp4 VP9 sample is a self-contained superframe, so there is no avcC repack and no parameter sets to re-inject. VideoMeta carries the codec, and the plugin picks its cros-codecs decoder from it. The C ABI is unchanged on purpose: the plugin demuxes the file it is given, so the codec is a property of the container rather than of the call, and a libengine_hw.so built before this still loads and still decodes H.264 -- it simply returns null for a VP9 path, the same no it gives for an unsupported profile. There is no software VP9 decoder to fall back to, so a VP9 file the plugin will not take is refused at open, by name, where the front-end can show it -- never a black screen, and never VP9 bytes fed to rusty_h264. One timeline stays one codec, and export re-encodes to H.264 as before; only audio is ever copied packet for packet.