Commits
Commits on
f7fa0fec0eea08cc1923f644fc1c5d4012dfba7f2026-11-06
🐛 A reversed clip's split cuts its opacity and grade keys where it plays them; a split never pushes a half past the key capAhmet Kaan Gümüş · f7fa0feBrowse files
🐛 Regroup keeps the right half's keys, ramp and end edge; MCP regroup names its lanes and copy_paste says a paste past the end appendsAhmet Kaan Gümüş · d144445Browse files
🐛 A cut through an eased key segment keeps the motion's exact shapeAhmet Kaan Gümüş · 79a9f49Browse files
💄 Title keys: the ease row says when the playhead is outside the title, and next-key says when the key is past its endAhmet Kaan Gümüş · 8e0ee9cBrowse files
✨ Title card keyframes: diamond, prev/next, easing and curve, move/scale/opacity rowsAhmet Kaan Gümüş · 48a175dBrowse files
✨ Effect keys get the easing picker and curve editor; the curve editor takes any key targetAhmet Kaan Gümüş · 91224b6Browse files
🐛 Curve editor: each key row's editor reads its own box, so two custom curves on the transform card each take their own dragsAhmet Kaan Gümüş · 29cb69fBrowse files
✅ MCP: sample_rate schema has a type; speed-ramp readback test no longer trips on the key listAhmet Kaan Gümüş · c77583cBrowse files
Merge branch 'worktree-agent-a4f0429ef5db9d836'Ahmet Kaan Gümüş · c327308
Merge branch 'worktree-agent-a4f0429ef5db9d836' # Conflicts: # MCP.md # crates/mcp/src/tools/project.rs
✨ MCP: sample rate, save templates and looks, proxies, render clear, chapter list, range-aware export, cancel all, undo history, speech modelAhmet Kaan Gümüş · 4988461Browse files
✨ Title keyframes: TitleKey (offset, scale, opacity), ttkeys (v56), MCP title_add/title_set keysAhmet Kaan Gümüş · 24f7908Browse files
✨ MCP: regroup, copy_paste, close_gap, solo ops; speed_ramp presets; cut_silence modes speed_up and keep_silenceAhmet Kaan Gümüş · c439c14Browse files
✨ Custom bezier curve editor on the keyframe ease row: Custom chip, draggable handles, one undo step per dragAhmet Kaan Gümüş · c21f6c1Browse files
✨ MCP reads back pan, pitch, deinterlace, lane pan, speed-ramp and gain keys, and saved looksAhmet Kaan Gümüş · b3755d5Browse files
2026-10-26
💄 UI pass: proxies off by default, picture-only fullscreen, hover submenus, level in the volume sliderAhmet Kaan Gümüş · f178286
💄 UI pass: proxies off by default, picture-only fullscreen, hover submenus, level in the volume slider
- Proxies: "Make them on import" now defaults to off (pref file and fresh
sessions); the switches say "proxies" so a search finds them.
- Fullscreen: a button at the transport's right end; fullscreen draws only
the picture and the transport band; Escape leaves it.
- Context menu: Clip label and Fit are hover submenus like Adjust and
Compound; moving between two ▸ rows switches the open submenu. A
right-click inside a selection makes the clicked clip the anchor, so
Equalizer no longer refuses on a linked video half; Alt+4 on a video
clip opens the EQ on its linked audio.
- Volume: the live output level rides inside the slider's fill instead of
as separate bars beside it.
- Hover hints: label and key chips share one centre line, even padding;
undo steps read as verbs ("Undo Enable/disable clip"), clearer wording.
- Resize while playing: the picture restart waits until the size has held
still for 200 ms instead of reseeking every 8 px.
- Ripple trim of a start edge no longer trips the lane's overlap check.
- Tests: no longer pinned to one ffmpeg's exact bitrates/offsets; the
.edith probe test writes its own project; overflow fixes in test helpers.2026-10-23
⚡ nextest fast tier: -P fast skips the slow decode/export testsAhmet Kaan Gümüş · c002f13Browse files
🚚 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-30
🐛 fix(test): the window guard's walk skipped no dot-directory, so a scratch clone spoke for the treeAhmet Kaan Gümüş · 308fc77
🐛 fix(test): the window guard's walk skipped no dot-directory, so a scratch clone spoke for the tree `every_window_write_outside_set_window_is_named` walks the workspace root and skipped only `target`, `.git` and `vendor`. This root also holds `.delta/` -- a gitignored scratch area of clones and worktrees left by delta/A-B tooling -- and the walk descended into it, so the guard was RED on main for ten window writes inside a checkout nobody edits, with every reported path under `.delta/worktrees/rfykqt93k1f7/`. The noise was the smaller half. The same stale clone was also being counted toward the coverage floor, so a foreign tree was propping up the assertion that exists to prove the walk reaches real source -- the guard could read a file or two of ours and still pass on the strength of a stranger's lines. Skipping every dot-directory rather than naming `.delta`: a dot-dir is by convention not part of the tree we make claims about, and the next scratch dir a tool drops here is then skipped by the same rule. Red before, green after, with `.delta` still on disk. Non-vacuity checked both ways: a real `s.out_us` write injected into `crates/engine/src/sweep.rs` turns the guard red on that path, and the file was restored byte-identically (sha256 36d00f17d595dedfaa0d087ab924e7117698e0527d48ac22fdd904cfffc1af91). The walk still reaches `crates/app` and now reads 86 files / 79,129 lines, which is what the floor's own comment already claimed.
🔀 merge(edithloader): the .edith door bounds the caption window, band gain and transform positionAhmet Kaan Gümüş · 2c809fd
🔀 merge(edithloader): the .edith door bounds the caption window, band gain and transform position # Conflicts: # crates/engine/src/project.rs
fix(engine): close the last two gaps in the window guard, and admit the restAhmet Kaan Gümüş · 04265e9
fix(engine): close the last two gaps in the window guard, and admit the rest
Two coverage gaps closed, one class documented as unmatchable, and a
third failure of this same guard found in the act of closing them.
**A `let` hid a struct literal.** The literal branch skipped any line
starting with `let `, so `let out_us = s.out_us;` was correctly a read
while `let tail = SubClip { in_us: cut, out_us: s.out_us, ..s };` -- a
plausible composer shape, and the shape `sub_clear` and `sub_open_room`
were written in before `set_window` existed -- went through green. The
exclusion is now per-occurrence and keyed on what FOLLOWS the name: `=`
is a local binding, `:` or `,` is a field. A tuple pattern
(`let (a, b) = ..`) is separated from a struct literal by the paren
rather than by the `let`, since the same comma means opposite things in
each.
**The walk skipped a file that never spelled the type.** Its filter was
`text.contains("SubClip")`, which is a name-based guess about which
files can reach the type -- the same mistake the hardcoded pair of file
names was, wearing a derived hat. A glob import and an alias defeat it
exactly as they defeated the list. The filter is gone: the walk now
opens EVERY `.rs` under `crates/` that is not test code, 86 files and
~77,600 lines, and the coverage floor moved with it (141 files and
~116,000 before `/tests/` and `mod tests` are cut).
**And the guard was silently asserting nothing.** While retuning that
floor, a clumsy edit deleted the `found.is_empty()` assertion -- the one
the whole test exists for. For a moment the test reported green while
`found` held a real offender, which is the fourth version of this guard
failing in the one way that looks exactly like success. Found by
instrumenting the walk rather than by reading the diff, which is the
only reason it was found at all. The assertion is back, with a comment
saying that if you retune anything here, check that line still exists.
**The unmatchable class, documented rather than chased.** `*a = *b;`,
`*a = other;`, `std::mem::swap(a, b)`, `a.clone_from(b)` and a macro
like `bump!(s.out_us, by)` all write a caption's window and none of them
spell the field name, so a field matcher returns nothing for all of
them. That is a property of the approach, not an oversight: a helper
that writes the field directly IS caught, and it is specifically the
whole-struct and macro forms that pass. The doc comment now names this
class FIRST, as the most likely route a real composer would take, ahead
of a rename of the fields, a writer inside a test, and a file outside
`crates/`. The five forms are pinned in a test asserted to be MISSED, so
the day one starts matching the test asks which side of the line moved
and the residual-risk list cannot quietly grow a claim the matcher has
not earned.
Guard verification, all from the tip, all red:
- the verifier's one-token `s.out_us += by(s.end(), to);` -> project.rs:5869
- a `let`-bound struct literal in place of `set_window` in `sub_open_room` -> project.rs:5807
- `regroup`'s two lines back to raw assignments -> project.rs:3491-3492
- a composer smuggled into `sweep.rs`, a third module -> sweep.rs:67
- a new module reaching the type by glob import and alias, never spelling it -> zz_glob_alias.rs:4
- clean -> green
`the_window_write_matcher_catches_the_ways_a_composer_hides` now pins
eight forms that must be caught (the five above plus `<<=`, a write
through an indirect `&mut`, and the shorthand), five reads that must not
fire, and five field-less forms asserted to be missed.
No production code changed: this is the `#[cfg(test)]` module only, and
all eight composers still route through `set_window`.fix(engine): make the window guard match how a composer actually writesAhmet Kaan Gümüş · edc51b5
fix(engine): make the window guard match how a composer actually writes The guard was certifying a claim it could not see. `s.out_us += by(s.end(), to);` is a ONE-TOKEN change from the real line, it left `every_window_write_goes_through_set_window` green, and a grouped caption's year-deep sibling really did end up 25,919,974,080,030us wide -- 288,000,000us past the ceiling, which `open_project` then refused. A guard that certifies a claim it cannot see is worse than a guard that says what it is, so this fixes the matching and relabels the claim. The old matcher knew four literal patterns: `.in_us = `, `.out_us = `, `in_us:`, `out_us:`. It now knows: - **every assignment operator**, not just `=` -- `+=`, `-=`, `*=`, `/=`, `%=`, `^=`, `&=`, `|=`, `<<=`, `>>=`. `==` and `<=` are excluded, and the first version of the new matcher got that wrong too: it counted `s.out_us <= s.in_us` as a write, which would have flagged every never-empty check in the file. - **struct-literal fields and the shorthand form** (`out_us,`), not just `field: value`. - **writes through a `&mut` the field access is indirect from** (`let x: &mut SubClip = q; (*x).in_us = 5;`), by skipping the `let` exclusion for the assignment forms and keeping it for the literal forms, so `let out_us = s.out_us;` is still not a write. - **every module in the workspace that can NAME `SubClip`**, found by walking `crates/` rather than by hardcoding `project.rs` and `edith.rs`. The two-file version was silently certifying a claim about `crates/app` it had never opened; the walk now asserts it reached the app, and it flags the two `timeline_edit.rs` palette-row sites that feed `place_sub` as named allowlist entries rather than as files it does not read. And it is labelled what it is: a **heuristic guard**, with the residual risk written down -- a write through a helper taking `&mut SubClip` in a form the matcher cannot see, a macro-mediated write, a `.rs` the walk does not reach, a writer hidden inside a test, and above all a RENAME of the fields, which would silence the matcher entirely while it stayed green. Two tests hold that line: - `the_window_write_matcher_catches_the_ways_a_composer_hides` pins six hiding forms, the verifier's `+=` among them, AND five reads that must not fire -- so the list above cannot be padded with reads to stay green. - `every_window_write_outside_set_window_is_named` walks the tree and asserts a coverage floor, because the first two versions of this guard were vacuous: cutting at the first `#[cfg(test)]` read 160 lines of a 10,800-line file, and cutting at the last landed inside the guard's own test module. A guard that reads nothing is worse than no guard because it reads as one, so the floor is asserted rather than assumed. Both proved by mutation, from the tip: - the verifier's one-token `s.out_us += by(s.end(), to);` -> the guard reds AND the grouped sibling reaches 25,919,974,080,030us; - a composer smuggled into a THIRD module (`sweep.rs`, which the old two-file guard never opened) -> the guard reds by file and line; - `regroup`'s two lines moved back to raw assignments -> reds; - clean -> green. **Why the compiler is still the better answer, and why it was not taken here.** Making `in_us`/`out_us` private to this module would turn every outside write into a compile error, which no one-token edit can defeat -- that is what "let the compiler be the proof" would buy. Priced: 74 `SubClip` construction sites workspace-wide, 31 of them in this crate's own integration tests, plus a public constructor to replace them, and it reaches `crates/app`'s `timeline_math.rs` and `player/timeline_edit.rs`, which other lanes own. That is a refactor of a door's public shape rather than a bound, and the wrong size for a bug-hunt lane sharing a machine with three siblings. The invariant itself is already structural in the code -- all eight composers call `set_window` -- so what this guard adds is the tripwire for the ninth, not the invariant.
fix(engine): make the caption-window bound structural, not per-armAhmet Kaan Gümüş · eb3f571
fix(engine): make the caption-window bound structural, not per-arm
Three rounds of review each found one more composer a per-arm check had
missed, and the third is the one that ends the sequence: the fix is not
another arm, it is the invariant's shape.
`grow_window` was not, in fact, the single writer of a window.
**A rejoin SUMS two legal halves.** `Project::regroup` keeps the left
half's `in_us` and takes the right half's `out_us` -- and `sub_joinable`
has just established that the halves are consecutive in the *source*,
so the joined width is the sum of two widths that each passed their own
door. Neither half is illegal; the whole is. Two 20-day windows and one
undo-a-split keystroke gave 40 days, which `save_project` wrote and
`open_project` refused. My sweep had disposed of this as "takes the
neighbour's own out_us" -- true, and beside the point: the ceiling bounds
a SUBTRACTION, not its operands.
**A head drag grows the width too.** The ceiling bounds a difference, so
falling `in_us` makes the window wider exactly as growing `out_us`
does. The Start arms clamped `in_us` from above (`in_us <= out_us - 1`),
which says nothing at all about the ceiling: a caption a year into its
source, dragged back 200 days, was 200 days wide with `out_us` never
moving.
So the bound is now one function every writer routes through:
set_window(&mut SubClip, in_us, out_us)
// 0 <= in_us < out_us && out_us - in_us <= MAX_WINDOW_US
and `grow_window` is gone -- it was a helper around one arm, which is
what made the other arms look exempt. Everything goes through
`set_window` now: `trim_sub` both edges, `write_sub_edge` both edges,
`regroup`'s join, and the four halves `sub_clear` and `sub_open_room`
build. The doors still REFUSE on entry (parse, `with_subs`, `place_sub`)
and `set_window` still CLAMPS on composition, because that asymmetry is
the point: a door sees a value nobody was mid-gesture on, a composer is
an edit a person is watching happen.
**The closed set is now proved, not argued.** Reasoning about arms does
not scale to an unknown number of them, so
`project::tests::every_window_write_goes_through_set_window` reads both
files and fails if `in_us`/`out_us` is written anywhere outside
`set_window` and the parser's two door lines. It is deliberately a
source scan rather than a `debug_assert!`, because a `debug_assert!`
only fires on a path some test happens to walk.
That scan was vacuous the first two times and the test says so:
cutting at the first `#[cfg(test)]` scanned 160 lines of a 10,800-line
file (a smuggled writer in `write_sub_edge` sailed through), and
cutting at the last one landed inside the scan's own test module. It now
cuts at the test module and asserts how many lines it read, because a
guard that reads nothing is worse than no guard -- it reads as one.
**The ceiling's stated reason was wrong and is now right.** I had claimed
`window_at` needed the ceiling below 2^53 for f64 exactness. It does not:
it is pure i64 with a `saturating_mul`, so the f64 argument never
applied. The real arithmetic: `window_us() * into` with `into` up to
4.29e9 saturates for any window above `i64::MAX / u32::MAX` = 2.1e9us
(~35 minutes), so 30 days is 1200x past the point where the proportion
stops being exact -- which is the actual precision cost, and the reason
this is not "unlimited". f64 exactness IS the right argument for
`sub_lane_cues`'s cue mapping, where 30 days is ~3.5 orders inside
2^53. Nothing else derives anything from a window, so a wider value
costs no memory: the ceiling is a claim about meaning, not resource.
Witnesses, each with its own mutation:
- `a_rejoin_of_two_legal_windows_stays_inside_the_ceiling` -- two 20-day
halves, one rejoin. Un-routed: "the rejoin summed two 1296000000000us
windows into 3456000000000us, past the 2592000000000us ceiling".
- `a_head_drag_no_further_than_the_ceiling` -- a year-deep caption, one
head drag to the offered room. Start arm reverted to a raw `in_us`
assignment: "gave a 3000030000000us window".
- `every_window_write_goes_through_set_window` -- passes clean; fails on
a smuggled writer in `write_sub_edge`, on on a smuggled writer in
`edith.rs`, and on `regroup`'s two lines moved out of `set_window`.
- Loosening `set_window` itself (dropping the ceiling clamp) reds all
four caption witnesses at once, which is the property a per-arm fix
does not have.
UX note, recorded as the verifier found it and left unchanged: a drag
that reaches the ceiling stops silently. That is consistent with every
other trim wall here -- `trim_to` drops the snap cue, `commit_trim`
toasts only on `Err` -- so the ceiling behaves like a wall, not like an
error.🔀 merge(decode): EXIF orientation is shown, and a decode failure says why it stoppedAhmet Kaan Gümüş · a72b5b1
🔀 merge(decode): EXIF orientation is shown, and a decode failure says why it stopped # Conflicts: # crates/app/src/tests/media.rs
🔀 merge(demux): the container header is bounded, and DisplayUnit 0/3 is judged by its rasterAhmet Kaan Gümüş · 2d4c4b4Browse files
docs(demux): name the dropped display height as a design gap, not an oversightAhmet Kaan Gümüş · 25cd3de
docs(demux): name the dropped display height as a design gap, not an oversight `PixelAspect::stated_size` reads a unit-0 pair's display height, checks it for the degenerate claim, and then does not use it -- a 1920x803 scope is drawn 1920x1080, because this engine's model moves the width only. That is correct today and I want it written down rather than left looking like a bug, because it stops being correct the moment any path starts honouring a stated display height: the height half is being discarded deliberately, and the reason it is safe to discard (`VideoMeta::height` is the coded height everywhere, and every consumer reads the aspect as width-only) is exactly what such a change would remove. Documentation only; no behaviour change.
fix(demux): a unit-3 DAR is judged by its raster too, not by its termsAhmet Kaan Gümüş · 8773473
fix(demux): a unit-3 DAR is judged by its raster too, not by its terms Second verification was right, and this is the same defect one match arm below the unit-0 fix: the unit-3 arm multiplied the DAR by the coded size and then judged the *derived* pair by the reduced-term bound, which is the rule unit 0 was just fixed for and unit 3 was left under. A DAR has to be brought onto the coded frame to become a pixel ratio, and that multiplies by the coded size, so what reduces afterwards carries the sizes. A 239:100 scope -- 2.39:1 -- derives 2151:1600 over a 1920x1080 coded track and the same over 3840x2160, both past the 1024 bound, while over 1440x1080 it derives 717:400 and passes. So the bound read the same ratio three different ways depending only on the frame it sat on, and refused the two frames a scope is most likely to arrive on. Measured, not inferred. `PixelAspect::stated_ratio` now takes the DAR against the coded frame unreduced and refuses only the degenerate case, so `width_factor` multiplies the coded width by it and bounds the raster with `MAX_DISPLAY_WIDTH` -- a bound on the picture rather than on the digits of a derivation. The pair itself is the engine's own model, unchanged, so every sane picture reads exactly as it did before. Witnesses, with the expected widths measured by running BASE 0c9d76c over the same fixtures rather than recomputed by me: - 239:100 over 1920x1080 coded -> 2582 (base 2582) - 239:100 over 3840x2160 coded -> 5162 (base 5162) - 239:100 over 720x576 coded -> 1376 (base 1376) RED before this change, reproduced on the same fixtures: the first two opened square at the coded size; only 720x576, which reduces to 239:125 and so passes the bound, stretched. Non-vacuity proven by mutating the arm back through `stated()` and watching the test go red. While matching base I also found and reverted a regression of my own: I had written the even-grid rounding as `next_multiple_of(2)`, which rounds UP, where the original `(x | 1) & !1` rounds DOWN. That would have silently moved every existing anamorphic picture by two columns (3840x2160 at 239:100 scales to 5163 and has always displayed 5162, not 5164). Restored to the original rounding, and the three expected widths above pin it. `a_hostile_sar_pair_is_still_refused_by_the_term_bound` holds the other half: the unit-4 SAR pair IS a ratio, so chosen bytes are still refused there, and a real 4:3 -- reduced or not -- is still read. The bound was moved off the arms it cannot judge, not dropped.
fix(engine): clamp a caption window on GROWTH, and raise the ceilingAhmet Kaan Gümüş · f23dd8f
fix(engine): clamp a caption window on GROWTH, and raise the ceiling A ceiling is only half an invariant. Every door -- the parse, `with_subs`, `place_sub` -- sees a window on the way IN, so on its own it left two holes, both of which cost a user their saved work. **The app could write a file it refused to open.** `trim_sub`'s End arm GROWS `out_us`, and it grew past the ceiling: a caption trimmed out to the room the engine itself offered reached 25 hours, `save_project` wrote `sub 1 0 3240000 0 0 90039000000`, and `open_project` refused that file with "past the 86400000000us a caption can hold". The trim is committed and undo does not survive a restart, so there is no in-app way back -- the editor wrote work it then could not reopen. The `saturating_add` that killed the overflow panic did not keep the value inside the bound. **The ceiling was below real use.** A caption's window is a window into SOURCE media, so its width is the length of the recording it was cut from, and that is not bounded by a day. A 25-hour conference stream or a lecture archive measures its own palette row in tens of hours, so the ceiling refused the user's own media back at them, at `place_sub`, with nothing placed. "A window this wide is a number nobody meant" holds for i64::MAX; it does not hold for a long recording. So: - `MAX_WINDOW_US` is 30 days, and the reason is arithmetic rather than editorial. `SubClip::window_at`'s proportion cut saturates rather than wrapping, so the ceiling is about PRECISION: f64 holds an integer exactly to 2^53, and 30 days is 2.6e12 -- nine orders of magnitude inside it, so the cut is exact rather than merely finite. It is 3.5e6x below i64::MAX, and exact in `sub_lane_cues`'s cue mapping for the same reason. No real recording reaches it; a typed number does not survive it. - `grow_window` is the growth law, and is now the single function that may write `out_us`. `trim_sub`'s End arm and the group-follow `write_sub_edge` both go through it. Growth CLAMPS and entry REFUSES, and the asymmetry is the point: a trim is a continuous gesture whose every intermediate frame the user sees, so clamping is a drag that stops -- exactly like the frame walls `trim_sub` already applies. A value arriving from a file or a foreign caller is not mid-gesture, so it is named and refused rather than quietly changed. - `trim_sub_room` is walled by the same number. A front-end asks it to draw the drag and then trims to whatever it is told, so an engine that offers a trim its own `trim_sub` would clamp is a drag that snaps back at the end of the gesture. The room and the trim now agree by construction. Witnesses, each with its own mutation (saveload.rs): - `a_trim_grown_to_the_offered_room_saves_and_reopens` -- 40-day track, trim to the offered room, save, reopen. Clamp removed: "gave a 2592027000000us window, past the 2592000000000us ceiling". - `a_group_trim_carries_its_sibling_no_further_than_the_ceiling` -- `follow_group` SKIPS the dragged member, so a primary-trim-only fix misses this entirely: the route is a sibling on a second lane, placed 20 days into the track so the same delta overshoots. Clamp removed: "the group carried the sibling to a 25919974080030us window" -- 10x the ceiling. - `a_caption_over_a_day_of_track_places_and_round_trips` -- a 25-hour track placed exactly as `Player::sub_of_track` builds it. Ceiling lowered to a day: refused at `place_sub`, nothing placed. Swept every other writer of `in_us`/`out_us`, all now inside the bound: - `sub_clear` (both halves) and `sub_open_room` (both halves): the values are `window_at` results, which `SubClip::window_at` already clamps into the window -- a split cannot widen what it splits. - `Project::close_gaps`-style join: takes the neighbour's own `out_us`. - `trim_sub` Start and `write_sub_edge` Start: `in_us` is clamped to `out_us - 1`, which is below the ceiling. - `app`'s `trimmed_sub`: moves `frames` only, never a clock. - `Project::sub_lane_cues`: reads the window, writes nothing.
🔀 merge(gain): monitoring owns the gain and re-arms the deviceAhmet Kaan Gümüş · 8c1aee4
🔀 merge(gain): monitoring owns the gain and re-arms the device # Conflicts: # crates/app/src/tests/mod.rs
🔀 merge(refusal): the decoder refusal survives the dock's seat dropAhmet Kaan Gümüş · 1896852Browse files
🔀 merge(falsedirty): the app arms its gates and marks proxy candidacyAhmet Kaan Gümüş · b8aec29Browse files
docs(engine): MAX_RESOLUTION is 8K UHD, and a DCI master is refused by nameAhmet Kaan Gümüş · e62406e
docs(engine): MAX_RESOLUTION is 8K UHD, and a DCI master is refused by name Verification was right that my comment called 7680 "the 8K ceiling", which reads as though an 8192-wide master were covered. It is not: 7680 is 8K UHD (7680x4320), and 8K DCI is 8192 wide. An 8192-wide ProRes 4444 XQ master opened before this lane and is now refused by name, because the bound is now asked of a container header and not only of a keystroke and a `.edith` line. `MAX_RESOLUTION` stays 7680 rather than being raised to 8192: `is_resolution` gates those two doors at 7680 as well, and widening the ceiling on every path to accommodate a container is a wider decision than a header fix should make on its own. A caller that needs DCI width raises it deliberately, on all four doors at once. So the behaviour change is a tested claim rather than a surprise: `the_resolution_bound_admits_uhd_and_refuses_dci_width_by_name` patches a copy of `assets/test_baseline.mp4` to 7680 wide (opens, read as stated) and to 8192 wide (refused by `UnsupportedDisplaySize`, message naming 8192). Both patches are the two u16 dimension fields of the visual sample entry, so the file length and every offset in it are unchanged.
fix(demux): judge a DisplayUnit 0 pixel pair by its raster, not by its termsAhmet Kaan Gümüş · 598e6c8
fix(demux): judge a DisplayUnit 0 pixel pair by its raster, not by its terms
Verification found a real defect in the previous commit: it applied the
reduced-term ratio bound to `DisplayUnit 0`, where the `Display*` pair is a
pixel SIZE. Reducing it against the coded size carries the *sizes*, not terms,
so the bound refused the two most common letterbox ratios on exactly the arm
the fix newly enabled: on a 1440x1080 coded track, 1920x1080 (4:3) opened
correctly but 1920x803 (2.39:1 scope) and 1920x1037 (1.85:1 flat) both
opened square at 1440x1080. The unit-3 DAR spelling of the same picture
(239:100 -> 717:400) was unaffected, because a DAR pair does reduce to small
terms.
The two bounds answer two different questions and are now kept apart:
- `stated` -- for a pair that IS a ratio (an mp4 `pasp`, `DisplayUnit 4`,
a unit-3 DAR). A reduced term past 1024 means chosen bytes, and that is
the right test there.
- `stated_size` -- for a unit-0 pixel pair. It takes the stated display
WIDTH and refuses only the degenerate claims (a zero half). Width is the
only axis an aspect moves in this engine: `VideoMeta::height` is the
coded height for every file, by design and by its own documentation, so
the height half of the pair is not taken and the raster bound in
`width_factor` (`MAX_DISPLAY_WIDTH`) is what limits the result.
`width_factor` no longer applies the term bound at all, because it is the one
function every door reaches and cannot tell whether its ratio was read or
built. Judging the raster has no conflict: it catches the wrap and the zero
without refusing a scope.
Witness RED, measured on the fixture, before this change: both cinematic
ratios reported `PixelAspect { h: 1, v: 1 }` -- square.
The unit-0 witness is also restated to match this engine's model honestly: a
1920x803 scope is drawn 1920x1080 here. The width is the file's own claim; the
height is the coded one, because a pixel aspect has never moved the height in
this codebase and this lane does not change that.fix(engine): the AV1 and hardware refusals report themselves tooAhmet Kaan Gümüş · 5dd4f36
fix(engine): the AV1 and hardware refusals report themselves too The class was not closed. `run` reported its decode and demux failures through `DecodeFailure`, but the two other decode loops did not: - `run_av1`'s software refusal printed "software AV1 decode failed at frame N" to stderr and set nothing -- the exact shape the H.264 witness reproduces, in a different loop and out of a different decoder. - `run_hw` never took the parameter at all; its mid-stream `Err` arm printed "hardware decode error at frame N" and returned. Both now set the same cell `run_span` already holds, keeping the stderr line for logs exactly as the other arms do. `run_hw` deliberately does NOT report the failure before its first picture: that `return false` is the signal that software should take over, the caller reports the fallback, and saying it there as well would put a fault on the strip for a span that is about to decode cleanly. `decode_failure.rs` loses its container-agnostic damage helper and the AV1 case. The helper only ever knew how to damage an mp4's mdat payload; every attempt to reach the AV1 arm through a Matroska fixture failed before a single frame decoded (a zeroed span breaks the EBML chain and the file will not open at all -- "bad EBML variable-length integer" -- and an EBML walk to zero only block payloads did not find blocks in the time available). Leaving a half-working fixture builder in a test is worse than naming the gap, so both are gone and the gap is in the report. Gates: cargo check -p engine --all-targets 0/0; decode_failure 2/2; exif_orientation 5/5; images 8/8.
fix(engine): the canvas gate asks about the pair the encoder placesAhmet Kaan Gümüş · 8d8aff1
fix(engine): the canvas gate asks about the pair the encoder places
The gate added in 2d54df8 handed `fit_is_identity` the source's CODED
pair, so every source whose samples are not square lost the copy door:
a 1440x1080 file with a 4:3 sample aspect draws at 1920x1080, and a
project opened at that size is copying it exactly -- main writes the
source's own 1440x1080 blocks and states the ratio in the `Display*`
elements, which draws at precisely the canvas. Measured: with the
preceding commit that project encoded instead
("HW encode (VA-API) · no sound to write") and
tests/anamorphic.rs::a_matroska_copy_keeps_the_pixel_aspect went 4/5.
The picture a fit is composed against is the DRAWN one --
`VideoMeta::width`/`height`, the coded pair with the file's turn and its
pixel aspect already applied -- so that is what the gate compares with
the canvas. The coded pair keeps its own question, which the pre-existing
coded-to-coded check already asks: what a copied track *declares*.
Measured: `a_matroska_copy_keeps_the_pixel_aspect` green again, seat
line "export video: copy (source packets)"; the whole anamorphic suite
5/5; video_copy 10/10 (the resized-canvas witness still bites); export
28/28; `cargo check --all-targets` 0 warnings. Two mutations, each
biting the other half: putting the coded pair back reds the anamorphic
test (anamorphic.rs:425), and making the identity always true reds the
canvas witness ("a smaller canvas (960x540) was copied").fix(engine): bound a clip's transform position, and sweep the loader classAhmet Kaan Gümüş · d964f6c
fix(engine): bound a clip's transform position, and sweep the loader class The third of the class "a number read out of a file a hand can edit, used in arithmetic without a bound", and the last one the sweep found. `transformed_dst_rect` caps `scale` at 1024 canvas widths for exactly this reason -- the comment at the cap says so -- and `pos_x`/`pos_y` multiply the canvas and are *added* to the placement's centre with no bound at all. `float()` in the parser refuses only inf/NaN, so `transform 3e38 0 1 0 0 0 0 0` is a legal line. `f64 as i64` saturates, so the value arrived as `i64::MAX` and the ADD is what overflowed: a panic on the compositing thread in a debug build, a silently wrapped position in a release one. Clamped to the same +/-1024 canvas fractions `scale` already gets, with saturating adds, so a position past the point where the picture is long gone gives the two empty rects the function already answers with. The sweep, over every numeric field the `.edith` parser reads and every config file the app reads. Two rules decide a site: a value is safe either because the parse bounds it by name, or because a consumer clamps it unconditionally before the arithmetic -- and only the second kind is silent about a value the file actually stated. The parser's four helpers (`number`, `number64`, `micros`, `float`) bound nothing; the bound is always in the branch or in a consumer. SAFE (bounded at the parse): resolution (`is_resolution`), fps (0 < f <= 1000), samplerate (1k..384k), limiter.ceiling_db (`with_ceiling` at the parse itself), clip geometry (`check()`'s `start + frames`), clip.speed, the three fade/transition counts (`.min(frames)`), clip.visualizer (`u8::try_from`), every table index (`table_index` re-checks), sub.start/frames (`checked_add`), sub.track (must name a palette row the file has), sub.link (saturating counter). SAFE (clamped by a consumer, wherever the value came from): eq/color/ transform floats, gain.db (`with_mix`), color.* (`Lut::new`), transform.scale/rotate/crop_* (`cap_w`, `nearest_90_steps`, the crop clamp), playhead (`landing`), source.audio_stream (no arithmetic; every consumer `.get()`s). KNOWN, NOT A FAULT: clip.viz_paint is an unbounded u64, but every accessor in `decode.rs` is a bit mask, so there is no overflow -- the glow byte is read unclamped where the writer clamps it to 16, so a hand-written file can ask for more work than the UI can produce. A cost, not a wrong answer. Left alone deliberately. The app's own config: eight files, only two carry a number. The stance-splits loader (I-2) is safe because `split_size` re-clamps every seam on every frame and `Player::split_px` is its only reader -- the loader stores a value the frame loop then bounds. The subtitle size is range-checked at the parse, and `RangeInclusive::contains` being a partial comparison is what makes NaN/inf fall back rather than survive. The keymap reads no number at all; the rest are whole-file tokens resolving to a bool or an enum.
fix(demux): the mp4 door gets the resolution bound the Matroska one now hasAhmet Kaan Gümüş · fcb7844
fix(demux): the mp4 door gets the resolution bound the Matroska one now has
The previous commit bounded `PixelWidth`/`PixelHeight` and left the mp4 arm
reading its dimensions unchecked. The mp4 crate types a track's width and
height as `u16`, which is a smaller claim than Matroska's EBML integer but
still eight times past `MAX_RESOLUTION`: a visual sample entry of
`ff ff ff ff` is a legal 65535x65535, and it reaches the same
`display_width * height` allocation in `decode.rs`.
Both doors now refuse a stated picture past the bound, by the same
`UnsupportedDisplaySize`.
Witness, with non-vacuity proven: the test patches the first visual sample
entry's two 16-bit dimension fields of a copy of `assets/test_baseline.mp4`
(offsets 32 and 34 into the entry) to `ff ff` and asserts the open is refused
by name. With the bound removed from the source the test fails ("a 65535x65535
mp4 is refused by name, never opened"), so it bites.docs(player): correct a comment that described a state the file did not haveAhmet Kaan Gümüş · 6f579f0
docs(player): correct a comment that described a state the file did not have The note beside the pre-arm list claimed `remove_lane` was off the list "for the same reason" as Crossfade and Dissolve. It is not: the three `ActionId::Remove*Lane` entries are still in that `matches!` block. They are still wrong there -- `remove_lane` now carries its own arm inside its `Some(Ok(()))`, so each of those removals arms twice over -- but taking them off is a wider pass over this list than the previous commit made, and the comment should say that rather than claim a fix that is not there.
fix(demux): a container may not state a picture past the resolution boundAhmet Kaan Gümüş · 48ad076
fix(demux): a container may not state a picture past the resolution bound The class sweep for lane H, and it found one more instance of the same defect one layer down from the `pasp` one: `mkv_tracks` read `PixelWidth` and `PixelHeight` with a bare `ebml_uint(...) as u32`, so a Matroska header could state any picture at all and the engine opened it. `crate::MAX_RESOLUTION` (8K) already existed for exactly this, and was applied to a keystroke (`PlaybackSession::set_resolution`) and to a `.edith` `resolution` line -- but never to a container header. So 65535x65535 opened cleanly, and `decode.rs:1324` then sized its stretched planes as `display_width * height`: 6_442_254_337 bytes for one frame's luma and chroma, before a single pixel is read. The `as u32` narrowing made it worse in the other direction too -- `PixelWidth` of 2^32+1440 truncates to 1440. Both elements are now refused by name, `UnsupportedDisplaySize`, matching the existing `NoVideoTrack` / `UnsupportedRotation` convention (Display impl, Error impl, `is_it`), so the open fails with a message naming the size claimed and the maximum, and a caller can match the type rather than the prose. Witness RED: the patched fixture opened and reported `65535x65535` coded, with the test naming the 6.4 GB allocation `decode.rs` would have sized from it. A companion test holds the other half of the contract -- the ordinary fixture is inside the bound and still opens -- so the bound cannot quietly become a refusal of the library.