forge
Explore
Log in

Don't you dare go Hollow

Commits

Commits on mainFiltered to crates/engine/tests/export.rsClear filter

2026-11-17

2026-11-15

2026-11-06

2026-10-23

🚚 edith moves to git.tahinli.comAhmet Kaan Gümüş · b02f499
🚚 edith moves to git.tahinli.com

The working tree as of 2026-10-23, as one commit on top of the last one
here. It carries the work up to that date plus the test-slimming work:
integration tests merged into one binary per crate, nextest config,
doctest = false, debug line tables only, perf tests behind --ignored,
and faster generators, reverse, undo, subtitle-export, hevc, stabilise
and hear tests.

2026-09-24

probe(demux): sample aspect ratio off the container, coded dims beside the display pairAhmet Kaan Gümüş · 66a1c40
probe(demux): sample aspect ratio off the container, coded dims beside the display pair

ffmpeg's model: the decoder keeps coded pixels and carries the SAR as
metadata. VideoMeta carries the pair now: coded_width/coded_height are
what the samples are stored at, pixel_aspect is the ratio one coded
pixel is drawn at (PixelAspect, square when nothing is stated), and
width/height stay the displayed shape their docs always promised --
stretched by the aspect, then swapped by the turn, in that order.

mkv: DisplayWidth/DisplayHeight/DisplayUnit read off the Video element
(units 3 DAR and 4 SAR; absent, or units 0/1/2, square -- measured
against ffmpeg 8.1.2, which writes a 16/9 DAR pair with unit 3 for a
setsar=4/3 source and nothing at all for a square one).
mp4: pasp (hSpacing/vSpacing) out of the visual sample entry, behind
the same fixed 78-byte header colr and hvcC sit behind, absent = square
-- measured: ffmpeg writes pasp 4/3 for setsar=4/3 and 1/1 otherwise.

VhMeta's twin fields ride along so the plugin ABI can carry the same
answer once a display size differs from the coded one.
🐛 fix(export): the truncation notice counts what a file could not giveAhmet Kaan Gümüş · ce7b65f
🐛 fix(export): the truncation notice counts what a file could not give

The D4 notice published `total - done` at the first span whose file ran out, but
that break only leaves the span's own `while`: the span loop carries on and
writes every picture the later spans have. A two-clip timeline -- a 100-picture
clip over a 60-picture file, then a whole 60-picture one -- therefore read
`· 100 frames of the edit past the last picture` for a file holding 120 of the
edit's 160 pictures, and the comment beside the publish claimed the walk ended
there, which is false for the code as written.

The walk now sums each broken span's own tail (`span.len - done_here`, which the
`while done_here < span.len` condition guarantees is positive) and publishes the
sum once, when the walk is over. `fetch_max` and not `fetch_add`, because a dead
hardware seat has the whole walk run again from its first frame: the same project
and the same picture counts, so a second run must not double a number that is
already on the line.

Measured, in the units the line claims: the two-clip repro now reads
`· 40 frames of the edit past the last picture` (was 100) while the decoded file
holds all 120 pictures the edit kept, and a healthy two-clip timeline carries no
notice at all. The repro fails on the previous bytes with `the notice counts more
than the file lost: ... 100 frames ...`; the control and the single-clip test
from the first commit stay green.

    cargo test -p engine --test export -- --test-threads=1 a_two_clip
🐛 fix(export): every sample-altering edit forces an encode, in one placeAhmet Kaan Gümüş · 24df84c
🐛 fix(export): every sample-altering edit forces an encode, in one place

The copy-or-encode gate existed twice: `forces_encode`, which a card reads
before the button (`planned_seats`, `audio_label`), and the runtime gate inside
`copy_audio`, which decides what the file does. A fade was on the first and not
the second, so an mp4 whose lane carried a fade-in or fade-out wrote the
source's own packets with the fade nowhere -- while the card had promised a
re-encode, and the WAV, FLAC and MP3 exports of the same project applied it.
Measured on a clip with a 1.5 s fade-in: the seat line read
`SW encode (ec-h264) · AAC copy` and the first quarter second of the file sat at
0.14 of its own tail level, against `ec-aac` and a rising ramp once both gates
ask the same question.

Both gates are now `sample_altered`, asked with the lane list each caller has --
every audio lane for the card's question, the one lane the segments came off for
the copy's -- so no condition can reach one of them and miss the other again.
The class was swept with it: `CopyPlan::of` is the picture's copy gate and names
its own sample-altering states (grade, transform, speed, rotation, rate, size,
colour, dissolve, gap, packing), and every one of them still falls back.

Three more on the same path.

`picture_progress` computed a picture count times a permille in `u32`, which
overflows past 4,520,913 pictures (42 hours at 30 fps): a panic in debug inside
the export thread, which a caller reads as `export worker panicked` on a file
that was never written, and a bar that thrashed in release. Computed in `u64`,
which the straddle test pins at the boundary the old shape could not hold.

The `catch_unwind` branch in `start` never deleted `<out>.part`, though the
module promises every failure path does: the only cleanup was in the body's own
`result.is_err()` arm, which a panic never reaches, so a panicking export left a
half-written file beside the name it never took.

A source that ran out under its clip ended the span with no notice and the bar
reached its end anyway, so a truncated file read as a whole one. The frames that
never got a picture are now published on `Shared` and composed into
`ExportHandle::encoders`, where the card already renders the seat line --
composed at read time, because that line is published again on a rerun in
software behind a dead hardware seat.

Tests, all four of which fail on the pre-fix tree:
`a_faded_clip_encodes_and_the_fade_reaches_the_file` (the seat line says
`ec-aac`, and quarter-second RMS windows of the exported file rise through the
fade and reach unity past it), `a_films_frame_count_does_not_overflow_the_bar`,
`a_panicking_worker_deletes_the_part_file` (an env-gated panic point, so the
branch is reachable without a codec parser that really panics, and no export but
the one it names can match it), and
`a_clip_that_outlives_its_source_says_so_on_the_card`.

    cargo test -p engine --test export -- --test-threads=1

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-16

✨ 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

✨ 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.

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.

2026-09-12

♻️ refactor(engine): the software H.264 export seat encodes with ec-h264Ahmet Kaan Gümüş · 0bc3a6b
♻️ refactor(engine): the software H.264 export seat encodes with ec-h264

The last rusty_h264 seat in the tree moves to the project's own encoder:
Enc::Sw drives ec_h264::Encoder (CABAC Main/High, 8x8 transform, threaded
slices) where it drove rusty's Constrained-Baseline CAVLC encoder, and the
export's second decode site (SwDecoder) follows the playback seat onto
ec_h264::H264Decoder in true display order, flushed at end of stream.

Feature mapping: same fps/bitrate/GOP knobs (the level the seat used to
compute by hand the encoder now derives from the same Table A-1); Fast
stays the preset; intra-only exports stay all-IDR through gop_size 1.
Named gaps: odd dimensions are now refused by name like the HEVC seat
(4:2:0 cannot crop back to an odd picture; the old encoder silently coded
them); the seat no longer forces level_idc. One honest flag rise: the
Matroska-facing key mark is now what the bitstream says, not a constant
false. One contract tightening, held rather than papered over: ec-h264
buffers nothing, so drain is structurally empty and the old lookahead
corner-cut note is closed.

tests/sw_backends' independent witness becomes ffmpeg byte-for-byte (the
rusty oracle retired with the crate); hw_encode and the mp4 repack test
decode through ec-h264; caps and the card label say ec-h264.

Quality, same 300-frame 720p window at the seat's own ~2.76 Mbps CBR,
both seats driven directly on identical frames and the outputs decoded by
ffmpeg (reviewer-reproduced numbers; an earlier in-lane harness measured
rusty at 25 dB through a stale-plane A/B bug -- frame-0 luma riding under
fresh chroma, which rate control hides in the byte count -- so its rusty
row was noise, while the ec row reproduced to the digit): rusty PSNR-Y
40.51 / SSIM 0.9842 at 3.46 MB against ec-h264 PSNR-Y 41.58 / SSIM
0.9903 at 3.39 MB -- about +1.1 dB-Y and +0.006 SSIM for ~2% fewer bits,
with tighter rate fidelity (rusty overshot to 3.0 Mbps on hard content).

2026-08-26

✅ test(engine): end-to-end mp4 interleave proof on the live export pathAhmet Kaan Gümüş · 2f0f298
✅ test(engine): end-to-end mp4 interleave proof on the live export path

mp4_interleaves_a_mix_that_lands_early_under_the_rest_of_the_picture
writes straight to Mp4Muxer to force the mix to land early; this adds
the losing branch's real, threaded export.rs test on top of it, so the
interleave boundary is also pinned through PlaybackSession::export_to
rather than only against a hand-constructed muxer call. Reuses this
branch's assert_no_single_stream_span_over for the run-length check
instead of duplicating its merge logic; adds a small first_pts helper
for the A/V sync assertion the losing test's ffprobe_packets covered.
✨ feat(engine): interleave the overlapped mp4 audio pass under the pictureAhmet Kaan Gümüş · 4ba4015
✨ feat(engine): interleave the overlapped mp4 audio pass under the picture

Mp4Muxer holds ~2s of pictures and releases them merged by pts against
landed sound instead of writing whole-picture-then-whole-track;
feed_late_audio hands the mix over the moment it lands.

2026-08-20

🐛 fix(engine): stale dialect asserts learn the current magicAhmet Kaan Gümüş · 6b8d7dd
🐛 fix(engine): stale dialect asserts learn the current magic

Six integration-test asserts still pinned "edith 16" on freshly saved
projects; the suite had not compiled since that dialect.
✨ feat(engine): clips can be moved, scaled, rotated and cropped (edith 20)Ahmet Kaan Gümüş · 684b8a4
✨ feat(engine): clips can be moved, scaled, rotated and cropped (edith 20)

Per-clip TransformParams (position, scale, 90-degree rotation, crop)
shared through a colour-style table, applied in both the playback
preview and the export compositor, persisted as the edith 20 dialect;
v19 files load untransformed.

2026-08-19

✨ feat(engine): clips can name a dissolve into their neighbor (edith 19, storage+format)Ahmet Kaan Gümüş · 8369d8e
✨ feat(engine): clips can name a dissolve into their neighbor (edith 19, storage+format)

transition_out frames on a video clip dissolve it into the adjacent
next clip; split keeps the tail's transition clamped and zeroes the
head; v18 files load with hard cuts, v19 round-trips bit-exactly.
Blending (playback and export) lands separately.
🐛 fix(engine): integration tests learn the sample-rate argumentAhmet Kaan Gümüş · c6b5eb7
🐛 fix(engine): integration tests learn the sample-rate argument

cf27932 added sample_rate to export::start and edith::save but left
every tests/ call site behind; cargo build -p engine --tests has been
broken since. All 34 call sites pass None (source rate), preserving
each test's old behavior.
✨ feat(engine): per-clip audio fades, adjacency crossfade, and edith 18Ahmet Kaan Gümüş · 6d0747c
✨ feat(engine): per-clip audio fades, adjacency crossfade, and edith 18

Clip carries fade_in/fade_out, an equal-power gain envelope mixed into
playback and export, a crossfade() op that sets both edges of two
adjacent audio clips, and split's rule that only the kept edge keeps its
fade. The project file format bumps to edith 18 to carry the two new
fields; a v17 (or older) file loads with every clip's fades at zero.

Fixes a stray fade_in/fade_out struct-literal fragment left outside any
Clip literal in Player::trimmed (crates/app/src/player/timeline_edit.rs),
which was a syntax error breaking the whole app crate's build.

Adds unit coverage for Fade::gain_at's boundary/midpoint curve, the
split edge rule, crossfade's adjacency refusal, the Clip size-lock
test (40 -> 48 bytes), and a v17-loads-zero-fades / v18-round-trips
edith.rs test.
🐛 fix(engine): the proxy tests take turns over their one filmAhmet Kaan Gümüş · 31449fc
🐛 fix(engine): the proxy tests take turns over their one film

Both proxy tests proxy test_av.mp4, and a proxy job is one per film:
run in the same binary, whichever asked second was refused ("a stand-in
for this film is already being made") and a cancel in one deleted the
file the other was asserting about -- the rotating failure this binary
has shown all sweep, misread as starvation until the panic named it.
A shared mutex serializes the pair; everything else still runs wide.
✅ test(engine): the long export waits ride out the binary's own loadAhmet Kaan Gümüş · c319ba2
✅ test(engine): the long export waits ride out the binary's own load

A software-seat export here costs up to ~130 s alone and the binary
runs its tests together; the 120/180/300 s completion budgets rotated
through starvation failures, a different proxy test each run. 600/900 s
now -- hang guards, the same law as the AV1 and subtitle budgets. The
short waits stay: 5-60 s there is stop-latency semantics under test,
not completion.
✅ test(engine): the proxy's opening window rides out its siblingsAhmet Kaan Gümüş · 2c8bd01
✅ test(engine): the proxy's opening window rides out its siblings

The encoder opens in under a second alone, but the binary's other
exports can starve the worker for minutes -- 120 s tripped three times
this sweep, twice under suite load and once under the binary's own.
600 s now: a hang guard, not a speed claim, same law as the AV1 budget.

2026-08-15

✨ feat(timeline): ctrl-click multi-selection, manual groups, ctrl+aAhmet Kaan Gümüş · 66d5395
✨ feat(timeline): ctrl-click multi-selection, manual groups, ctrl+a

The app half of manual clip grouping: the timeline's selection becomes
a list of picks (Selection, click order kept, anchor = last), ctrl+click
toggles a pick on every clip box, caption box and edge strip, and a
right-click on a picked placement keeps the selection so the menu's
Group row acts on all of it — one pick keeps the span-partner flow.

SelectAll takes ctrl+a (every clip and caption, one selection) and
RemoveAudioLane moves to ctrl+q beside its own letter. The oracle
unhides Group and Detach over captions, words the one-clip-per-lane
refusal, and the caption menu grows the group rows. marked() lights
every pick and its link-mates — captions included — captions wear the
grouped border, trims preview each member by the drag's delta clamped
to its own room, deletes route a grouped caption through the group
door, and a drag's snap excludes the group it carries. The save-format
tests and every affected app suite updated with the new shapes.

2026-08-14

🐛 fix(ui): a stand-in being made can be stoppedAhmet Kaan Gümüş · e534575
🐛 fix(ui): a stand-in being made can be stopped

A proxy is a whole film through a decoder and an encoder, started
without being asked for, and until now there was nothing that could stop
one: the row said "proxy 12%" for as long as it took, on a machine
somebody was trying to cut on.

So the row that shows the encode running carries the way out of it: a ×
beside the percentage, the subtitle row's button and the subtitle row's
rule -- it stops the click there, since the row under it picks a file
and stopping an encode is not a way of choosing one.

The engine already had the stop (`proxy::Job::cancel`, the export's own
checkpoints), so nothing new was invented for it. What is new is the two
states between the click and the end: `Cancelling` holds the job while
the worker winds down -- it gives up at its next frame and deletes its
own half-written file -- and `Cancelled` is where it settles, kept in
the map so no repaint starts the encode that was just stopped all over
again.

The worker's own answer is what settles it, which is what makes the
three claims checkable rather than hopeful: nothing is left under the
name a finished stand-in would have (the cache is looked up by existence
alone, so a file left there is a cut made on a truncated picture), the
`.part` goes with it, and an encode that *beat* the stop settles as the
ready stand-in it is rather than being deleted underneath the switch
that is playing it. Asking twice is asking once.

The new test in tests/export.rs is those four in one pass, on the
software seat: stop it mid-encode, wait for the worker, then look at the
directory.
🐛 fix(engine): a bar that has been filled is not taken back when the GPU diesAhmet Kaan Gümüş · 197d1e2
🐛 fix(engine): a bar that has been filled is not taken back when the GPU dies

The hardware encoder's process dying puts the whole export through the
software encoder again, and the bar was put back to zero to do it: a
person watching 93% of a film written suddenly saw 5%, at the one moment
they most needed to believe the editor was still working. The mark holds
instead, and the re-run moves it on once it passes it -- which needed the
copied-picture path to publish with `fetch_max` like everything else.

With it, the rest of that same seam:

* the audio pass is joined however `run` leaves, not detached. The mp4
  path runs the sound beside the picture, and a picture that failed left
  that thread running: the re-run then started a second pass, so a
  machine that had just lost its GPU mixed the same film's sound twice
  at once.
* a dead child is a *type* (`hwproc::Lost`) and not a phrase. `is_lost`
  commits an export to being written again from the first frame, and a
  substring match handed that decision to any future error whose wording
  happened to mention the child.
* a wedged child is waited out by its own measure. The 15 s ceiling is
  what an encoder opening on a 4K frame may need, and it is also fifteen
  seconds an export spends on a child that will never answer again,
  before the software encoder it is owed can begin. Once a child has
  answered its first frames it has said what its frames cost, and eight
  times the slowest of them (never under two seconds) contains a wedge
  in two or three rather than fifteen -- while a slow open still gets
  the whole ceiling and is never killed for being slow. The editor is
  live throughout either way: the wait is on the export's own thread.
* the countdown cannot be handed a rate below zero or a division by
  nothing: a bar that went backwards read as "~0:00 left" over six
  minutes of encoding, and the estimate is a guess, never a lie.
🐛 fix(engine): the seat a test cycles is one no other test is sitting inAhmet Kaan Gümüş · 88ce23e
🐛 fix(engine): the seat a test cycles is one no other test is sitting in

The stand-in encoder seat was armed by a process-wide variable and read by
`hw_seat`, so a software test that had already opened its own export picked
it up mid-flight, met the hang injection, and stalled: `cargo test -p engine
--test export` was green or five-failed depending on the interleaving. The
progress reset the fallback does made it worse -- one cancel test hot-spins
on progress reaching 1.0 and a regression there never ends.

The seat is process state, so it is borrowed rather than assumed: the whole
software suite shares a read guard, exactly as parallel as it always was, and
the encoder-death family takes it exclusively, lifting the software encode
pin only for its own exports and putting it back before it lets go. Which
lets `hw_seat` go back to being production policy with no test flag in it.

Also: a child that does not answer `vh_enc_dma_geometry` is now reaped there
instead of costing the next picture a second whole timeout; the plugin's own
note no longer claims the editor never loads the encode half, when what it
never does is *call* it -- the availability check is a dlopen and opens no
VA-API display; and the guard that refuses to write an export again in
software when a person picked the GPU by name now has the test it was
shipped without.
✨ feat(engine): the driver that aborts kills a process nobody was editing inAhmet Kaan Gümüş · c0a1847
✨ feat(engine): the driver that aborts kills a process nobody was editing in

Mesa's radeonsi calls libc abort() from its own C worker thread when the
video ring resets under it -- amdgpu_ctx_set_sw_reset_status, mesa 26.1.6,
vcn_unified_0 hung during an AV1 encode submission on 2026-08-13. A foreign
thread's abort is not an unwind, so every catch_unwind in the plugin was
structurally unable to see it: the editor died with the driver and took the
session's work with it.

So the encoder is not in the editor's address space any more. HwEncoder is a
handle on a `hw-encode-child` process that dlopens the plugin, and its death
-- by abort, by any signal, or by going quiet past VE_HW_TIMEOUT_MS -- comes
back as an error the export answers by writing the file again in software.
A person who picked the GPU by name still gets the refusal in words rather
than an encoder nobody chose.

Isolation that cost the speed would not be worth having, so pictures do not
travel down a pipe: in-memory ones go through a memfd mapped in both
processes, and pictures still on the GPU never move at all -- their
DRM-PRIME descriptors cross as file descriptors over SCM_RIGHTS, so the
zero-copy export path stays zero-copy across the boundary. Measured on this
box at 1080p: 430 fps in-process, 384 isolated, 89% of it, worst case
(every export of an untouched clip takes the descriptor path instead).

The proof does not need a wedged ring, which is the one thing a wedged
machine cannot supply: VE_HW_TEST_FAKE opens a stand-in seat in the child and
VE_HW_TEST_ABORT / VE_HW_TEST_HANG say where it dies or stops, so the
containment paths are exercised on any machine, GPU or no GPU.

Decode is still in the editor's process, where the same abort would still be
fatal; the seam to move it is now the one this built.
✨ feat(engine): the words a project places are in the file it savesAhmet Kaan Gümüş · df4020f
✨ feat(engine): the words a project places are in the file it saves

The `.edith` grows a `sub` line -- `sub <lane> <start> <frames> <track>
<in> <out>` -- and a bare `sub <lane>` for a subtitle lane holding
nothing, written in the lane's own place among the video and audio ones
so the display order a load rebuilds is the one that was saved. Both of
a caption's clocks are on the line: the placement in timeline frames
like everything else, the window in the microseconds its cues are timed
in. MAGIC is `edith 15`.

`Project::without_orphan_sources` stops filtering the subtitle lanes out
of its `Parts` and `Project::lane_gains` stops filtering them out of its
gains -- the two are zipped by `edith::emit`, so they were only ever
allowed to filter in step, and now neither does. What is *on* those
lanes travels beside them in the new `Project::lane_subs`, one list per
lane exactly as the gains are, and comes back through
`Project::with_subs`, which is `from_parts` for words: it refuses a
caption on a lane that is not a subtitle lane, an empty span or window,
a track the palette does not have, a span past the last frame there is,
and a lane that overlaps itself. The parser refuses the same file by
line number.

A v14 project is one that named subtitle files and could place none of
them: it loads with its palette whole and no subtitle lane at all, which
is what it always meant, and re-saves as v15 having invented neither.

Also fixes a version-bump straggler in tests/silence.rs, which asserted
`edith 13` against a `edith 14` writer and was red before this change.
✨ feat(app): the seat that writes the picture is picked on the card, not by an env pinAhmet Kaan Gümüş · 50af5b5
✨ feat(app): the seat that writes the picture is picked on the card, not by an env pin

The export card gains an Encoder row: Auto, Hardware or Software, three rows in a
list like every other setting with more than two values -- `e` steps it, a click
opens the list, and the planned line under the rows re-probes and says which seat
it measured.

Auto is what every export did before (the GPU where there is one). Hardware is
the GPU or a refusal in words -- `Enc::open` refuses before the muxer exists, so
nothing is written -- and it is now the only door to the plugin's AV1 seat, which
`VE_HW_AV1=1` used to guard: an env pin nobody exporting a film would ever find.
A person who picks it for AV1 gets a plain row naming what happened on this box's
driver, and the pick still stands.

Software forces the CPU encoder, which also takes the zero-copy path off the
table by construction (`Enc::dma_want` answers only for the two hardware seats).

Kept with the project: `.edith` gains an `encoder` line at v14, written only when
it is not Auto, and a v13 file loads as Auto.

- engine: `ExportSettings::force_sw` -> `seat: EncoderSeat`; `hw_seat` returns the
  refusal instead of falling back; `planned_video` says `NO_HW_SEAT` where it would
- app: `Pick::Encoder`/`Choice::Encoder`, card row, `e` in the card's own keyboard
  and in the keys menu (`FIXED`)
- tests: the backends sweep runs all three seats (the AV1 hardware seat excepted,
  as before), and asserts the refusal is only what a missing seat produces
✨ feat(app): the stand-ins are made when a project asks, not whenever a big film arrivesAhmet Kaan Gümüş · 269b0c2
✨ feat(app): the stand-ins are made when a project asks, not whenever a big film arrives

A project now says whether an import makes a proxy by itself. On is the
default and the line left out, so every project that came before behaves
exactly as it did; off makes nothing at all, and turning Proxies on is
what asks for the ones the project is missing -- the only ask there is,
since no per-source item exists.

The file grows an `autoproxy` line and the version goes to 13: a v12
project makes them by itself, which is all any project could do.

The switch is a button beside Proxies in the PROJECT panel, ctrl+o, and
a row on the actions card -- the three doors together, as the two
sync tests require.
🧪 test(engine): the hardware proxy is decoded, not just countedAhmet Kaan Gümüş · 79f2bac
🧪 test(engine): the hardware proxy is decoded, not just counted

`a_hardware_proxy_is_every_frame_a_starting_point_too` counted `demux::sync_points` and never read a picture, so it stayed green through 150 of 150 access units no decoder would accept. It now decodes every picture back through the engine, refuses an empty one, and lets ffmpeg read the file with `-v error` and say nothing.

2026-08-13

🐛 fix(engine): "no picture in it" is a header's answer, not an extension's guessAhmet Kaan Gümüş · 627d623
🐛 fix(engine): "no picture in it" is a header's answer, not an extension's guess

Two residuals of the proxy round, and the doc line that makes a hardware
run measure the code it was meant to.

The quiet answer for a file that is not a film was name-shaped: an
audio-only `.mp4`, `.mkv` or `.mov` is a video container with no video
track in it, so no extension can tell and every one of them still opened,
failed and said "NO PROXY" about a song. Only the header knows, and the
demuxer already knew -- it just said so in prose, which is the one thing
in this engine free to be reworded. `NoVideoTrack` makes it a type: the
two doors that mean *this file carries no picture at all* return it, a
front-end still shows the sentence it always showed, and the proxy takes
it as the same silent `None` a 1080p film gets. A picture in a codec
nothing here decodes is not that class and stays loud.

...and the cap was soft by exactly what it was capping: the sweep aimed
at 20 GB and then two encodes wrote gigabytes on top of it, so the disk
held the cap plus a film per encode (~43 GB worst case). It now sweeps to
`CACHE_CAP - reserve`, where the reserve is what those encodes will
really take -- the file's own bits-per-pixel arithmetic times the 1.25 the
hardware seat overshoots its asked-for rate by -- held to half the cap so
a single 4K feature cannot empty the cache to make room for itself.
`AT_ONCE` moves into the engine beside that arithmetic: how many encodes
run at once *is* how much room the sweep must leave, and two places
holding that number is one place for them to disagree.

The ignored hardware tests now say to build `-p engine-hw --release` as
its own step: `--tests` does not rebuild the cdylib, so the plugin beside
the test binary is whatever was there last time -- and a hardware claim
measured against a stale one is a claim about code nobody edited.

One commit rather than two: both fixes are in `proxy.rs`, in regions a
hunk split cannot separate cleanly (it was tried once and produced a
corrupt intermediate), so each is named here instead.
🐛 fix(engine): the GPU's stand-in was one starting point long, not every frameAhmet Kaan Gümüş · 60ae56c
🐛 fix(engine): the GPU's stand-in was one starting point long, not every frame

A proxy asked the ordinary hardware seat for a key frame on every
picture, which is not the same thing as an intra-only file and does not
make one: cros-codecs' low-delay predictor takes the keyframe branch
with `idr` false for a forced key frame, writes no SPS or PPS with it,
and `fix_slice_nal_headers` -- which reads the parameter sets to know
what a slice is -- then marks it a plain I slice. A 60-picture hardware
proxy came back with **one** frame a decoder could start on, so its
seeks were the film's own seeks and the whole point of it was gone.
Software was right all along (150 of 150), which is what hid it.

The thing that decides this is the predictor's group limit, and a group
of one picture is what an intra seat is: the counter is then pinned at
zero, every picture takes the keyframe branch as an IDR, and every
access unit carries its own parameter sets. That is the HEVC seat's own
mechanism, now the H.264 one's as well.

Its own plugin symbol (`vh_enc_open_intra`) rather than a flag on the
existing one, matching the AV1 and HEVC seats: a plugin built before it
exists has no intra seat, and the caller then takes the software encoder
-- which codes one frame a GOP and writes what was asked for -- instead
of being handed a long-GOP file under a name that promises otherwise.
`intra_only` on anything but the mp4 pair is now refused by name.

Checked without a GPU: the group limit and the IDR-marking rule are both
unit tests in the plugin. The hardware end-to-end twin (`sync_points`
== frame count) is written and `#[ignore]`d, for a machine whose GPU is
not wedged.
✨ feat(engine): the picture may come off the stand-in, the delivery never doesAhmet Kaan Gümüş · 79c69dd
✨ feat(engine): the picture may come off the stand-in, the delivery never does

One switch for the project, saved with it as the v12 `proxy` line, and
one place that reads it: the span open asks `picture_path`, which hands
back the stand-in where the cache has one and the film itself
everywhere else. The sound is opened elsewhere and is always the film's;
`export` reads the project's own sources and knows nothing of proxies,
so a delivery cannot come off one -- and both sides now say out loud
which file they read (`export source:` / `picture: proxy`), so that is a
grep rather than a belief.

*Which* films have a stand-in is deliberately not saved: a proxy is
found by the film's own path, length and modification time, so the cache
is the single answer and a project file cannot go stale about it. A v11
project loads unchanged and is cut on its films, which is all it could
ever do.
✨ feat(engine): a big film gets a small stand-in to cut withAhmet Kaan Gümüş · 83e561d
✨ feat(engine): a big film gets a small stand-in to cut with

A proxy is the film at 1280 on its long edge, every frame an IDR, no
sound in it at all: a seek lands on the frame asked for instead of on
the nearest one a decoder can start from, and the mix stays the
original's.

Generation is the export walk given a one-clip project and a smaller
canvas, so the hardware seat, the progress and the cancel are the ones
a file export already had. Two switches were wanted for it: `intra_only`
(one frame a GOP on the H.264 pair) and `keep_source_colour`, which
carries the film's own space into the stand-in instead of converting it
-- that conversion ran on the source's full 4K, cost 48 ms a frame and
was the whole of a proxy's price, and leaving it to the screen means the
tone-map preset can still be changed after the stand-in was made.

The cache is keyed on the source's path, length and modification time,
so a re-encoded original misses rather than reading a stale stand-in.

A 4K HDR film: 2.35x realtime on the VA-API seat, against 0.59x before
the colour switch; a cancel leaves neither the file nor its .part.

2026-08-11

✨ feat(colorspace): a file says which matrix and curve its numbers are in, and edith reads itAhmet Kaan Gümüş · 070ffe6
✨ feat(colorspace): a file says which matrix and curve its numbers are in, and edith reads it

Three tiers, per field: the container's own tags (Matroska `Colour`, mp4
`colr`), then the bitstream's (H.264/HEVC SPS VUI, AV1 `color_config`),
then the ffmpeg/mpv resolution rule -- 720 lines or taller is BT.709,
below it BT.601, limited either way. A code that says nothing, or says
something with no implementation here, falls to the next tier rather than
answering wrongly.

`VideoMeta` carries the answer; nothing consumes it yet. Everything still
renders through the hardcoded BT.601 it always did, which is the bug this
is the foundation for fixing.

The bit-level walks are where this can quietly go wrong: an SPS whose
scaling lists are counted wrongly lands the VUI read in the middle of a
coefficient. Both are measured -- H.264 and HEVC against hand-built
parameter sets (no encoder here writes SPS scaling lists), the rest
against fixtures tagged in the container, tagged only in the bitstream,
and tagged nowhere, plus the two real films: a 4K HDR remux that reads
BT.2020/PQ and a fully untagged 720p one that reads BT.709.
🧹 test(scratch): a fixture directory is deleted by the test that made itAhmet Kaan Gümüş · 5c39124
🧹 test(scratch): a fixture directory is deleted by the test that made it

Every suite here made its own directory under /tmp with a name and a
process id and then walked away from it: 2907 `ve_*` directories, 6.4G of
a 16G tmpfs, none of them reclaimable by anything but a person with `rm`.

`engine::scratch::Scratch` is the one place a throwaway path comes from
now -- a directory, or the single file inside one -- and `Drop` is what
takes it back. That is the whole reason it is a guard rather than a
cleanup call at the end of a test: unwinding runs `Drop`, so the *failing*
tests, which are exactly the ones that used to leave the most behind,
clean up like the passing ones.

It derefs to a `Path`, so the call sites did not have to change: the
helpers that handed back a `PathBuf` hand back one of these. The prefixes
stay what they were, so a directory is still recognisable while a test is
stopped in it.

Nothing about what a test *does* moved -- only where its fixtures live and
when they die. Driven: the whole engine suite and the app's own tests run
with the count of `/tmp/ve_*` before equal to the count after.

2026-08-10

✨ feat(timeline): clips play at a speed of their ownAhmet Kaan Gümüş · f8effe8
✨ feat(timeline): clips play at a speed of their own

A clip gains a rate (`Speed`, thousandths of real time, 0.25x to 4x) and
every speed question is answered at the mapping seams that were already
there: `Clip::frames` is the source range divided by the rate, `end` is
built on it, and `map`/`span_at`/`composite_span_at` walk the offset
through `Speed::source_at`. `in_frame`/`out_frame` stay *source* frames,
so a trim and a split still address the file.

The picture needs no new decoder: the span says how many source frames it
reads, and `try_frame` brings the decoder's numbers back through the same
rate -- at 2x two decoded frames land on one timeline frame and the
display's drop-when-behind policy takes it from there. The sound is
resampled per segment inside the worker playback and the audio export
already share (linear interpolation, carried across packet seams), so the
pitch moves with the rate: tape, not pitch-preserve, and the card says so.
Each segment is told how much timeline it owes and pads or trims to it,
which is what keeps a run of speeded cuts from drifting.

Rounding is where a rate could break the lane, so it does not: `Speed::fit`
never hands a trim more source than its room holds, and `Speed::split_at`
refuses a cut a slow clip's rate cannot address rather than leaving two
halves that no longer add up. The fuzz sweeps set_speed in with the rest.

- card in the eq/colour pattern, on `j` and in the clip menu; a drag is one
  undo step for the whole linked group, 1.00x reachable by hand and by `r`
- clip boxes carry a "2.00x" mark, and their width, waveform and details
  row are the timeline length
- WAV/FLAC honour it; mp4 and AV1 *refuse* by name -- that path copies AAC
  packets and a resample is not a copy (ponytail names the upgrade path)
- .edith v8 carries the rate; v7 and older load at 1.00x
- `assets/test_speed_sync.mp4`: one flash, one beep, same instant. At 2x
  they still land together, to the frame.
✨ 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(timeline): every lane draws and tracks can be addedAhmet Kaan Gümüş · 30e8aae
✨ feat(timeline): every lane draws and tracks can be added

The panel drew V1 and A1 and nothing else, so the N-lane model, the
composite playback and the v6 format had no way into the window. It now
draws a row per project lane, labelled from Lane::label, and grows the
panel per row up to a cap past which the lane column scrolls.

+ V / + A -- and the v / a chords, in the registry so the keys menu lists
them -- add a track; undo takes one back like any other edit.

The V1/A1 pinning the last two slices flagged is gone: delete_clip takes
the lane its index belongs to (Project::delete_in), a drop names the lane
it was let go over (place_stream_at's onto), and whole_take decides
ripple-or-lift per lane -- a clip on an added track is a layer and is
lifted, while the first pair keeps exactly the semantics it had.
Project::paste now inserts into V1/A1 only while still opening room
everywhere, or an Add with three lanes would have played one sound twice.

The export card greys MP4 out with its reason when more than one audio
lane carries sound, on the row and on the m chord both, so the engine's
refusal arrives before a destination is picked.
✨ feat(engine): per-clip color persists in .edith v6Ahmet Kaan Gümüş · 0530fc9
✨ feat(engine): per-clip color persists in .edith v6

A clip names a colour grade the way it names an equalizer: an index into an append-only Project table, deduped on set, pruned at save, inherited by both halves of a split and carried by copy, paste and undo.

The file format grows a color <b>:<c>:<s>:<t> line and a 7th clip field; v5..v1 still load and every one of them re-saves as v6. Clip grew from 32 to 40 bytes -- the eq index fit the padding hole, the colour one did not.
✨ feat(engine): per-clip EQ persists in .edith v5Ahmet Kaan Gümüş · 782fc53
✨ feat(engine): per-clip EQ persists in .edith v5

A clip names its equalizer by index into a project-level table, the way it
already names its source: `Clip` stays `Copy`, so a split hands both halves the
same settings, a clipboard copy carries them and an undo restores whichever
index the clip had. The table is append-only within a session -- an index on a
clipboard clip or in an undo snapshot can never dangle -- and only a save prunes
it, exactly as an undone import leaves its source entry behind.

The file grows `eq <band>...` lines (freq:gain:q:shape, printed `{:?}` so every
f32 comes back bit for bit) and one more clip field naming one of them. v4, v3,
v2 and v1 still load and re-save as v5.