forge
Explore
Log in

Don't you dare go Hollow

Commits

Commits on 86e94558ec24409c8edf12e29a2a468fc50ec75dFiltered to crates/engine/src/scale.rsClear filter

2026-08-13

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

2026-08-10

✨ 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(engine): I420 scaler and fit geometryAhmet Kaan Gümüş · dd54308
✨ feat(engine): I420 scaler and fit geometry

Bilinear 16.16 rescale, four fit policies handing back chroma-grid-aligned
placement and crop rects, and a canvas blit -- the primitive a project
resolution decoupled from media resolution needs. 3.82 ms/frame for
1280x720 -> 1920x1080 in release; nothing is wired to it yet.