forge
Explore
Log in

Don't you dare go Hollow

Commits

Commits on bcb4dc5db29b96be7e6ace4ff2f41d65016df705Filtered to crates/engine/src/export.rsClear filter

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

🔀 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
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): the copy door reads the project canvas, not just the coded sizeAhmet Kaan Gümüş · 2d54df8
fix(engine): the copy door reads the project canvas, not just the coded size

An untouched HEVC/AV1 Matroska project whose canvas differs from its
source's coded pair exported at the SOURCE's frame size, entirely
unscaled, with the seat line still reading "copy · …" -- a file at a
resolution nobody chose.

`CopyPlan::of` compared each source's coded pair with `meta.coded_width`
/`coded_height`, which the demuxer wrote for the first source and only a
*source* ever moves. The canvas a person picks rides in `meta.width`/
`meta.height` (`PlaybackSession::set_resolution` writes exactly those
two), and nothing in the gate looked at it -- so a resized project took
the copy door and shipped the source's raster.

The gate now asks one question where it asked none: is this clip's
placement of this source on this canvas the identity? That is
`fit_is_identity`, computed from `scale::fit_rect` itself rather than
from a list of policies, so it refuses a canvas of another size under
every policy while holding for `Fill`/`Stretch`/`Center` on a canvas the
size of the source's own samples -- where there is nothing to crop and
nothing to resample. The encode door is untouched (it already sizes
from the canvas), and so is what a copy writes when the canvas matches.

Witnesses in crates/engine/tests/video_copy.rs, both red before:
a_canvas_the_source_is_not_is_encoded_at_the_canvas (960x540 and
720x1280 on a 1280x720 fixture: encoded, and at the canvas) and
a_fit_policy_on_a_matching_canvas_is_still_the_identity (Fill,
Stretch and Center on the source's own canvas still copy, byte for
byte -- which a blanket "non-default policy re-encodes" fix fails).
fix(engine): a still is shown the way its EXIF orientation saysAhmet Kaan Gümüş · e600a6e
fix(engine): a still is shown the way its EXIF orientation says

A phone photographs a portrait picture and stores it as landscape plus a
tag saying which way up it is. The `image` crate keeps that tag in its
decoder and applies nothing, so every still door read the *stored* shape:
the preview, the timeline clip box, the poster thumbnail, the library
row, the canvas seed and an export of that clip. A portrait phone photo
opened sideways in all of them, silently.

The turn is now read and made once, in `Still::open`, before the planes
are written -- the same step the video doors take for a display matrix,
at the same place in the pipeline, through the same `Rotation`. Because
the turn is in the planes, `Render`, the `VideoMeta` both still doors
mint, an export's `place_picture` and `image_size` all report the shown
pair without any of them re-deriving it, and no consumer can be
forgotten.

EXIF 2, 4, 5 and 7 are mirrorings and this engine has no flip anywhere
in its pipeline, so they are refused by name at the door
(`UnsupportedStillOrientation`, `is_it` and all) the way a display
matrix that is not a quarter turn is: a mirrored photo shown the wrong
way round is a wrong picture, not a missing feature. The refusal is
propagated unchanged rather than folded into a sentence with the file's
name, so a caller can still downcast it.

`DecodeSession::open_range` also reaches a still now. It handed one to
the mp4 demuxer, which answers "a box with a larger size than it" -- a
true sentence about a container and nothing a person can act on -- so
this door, the one a front-end opens a file through, refused every
picture outright, and the poster thumbnail was one of its callers.

Witness (crates/engine/tests/exif_orientation.rs, 5 tests): a JPEG built
in-test with four coloured quadrants and a hand-written APP1/EXIF
segment carrying tag 0x0112, sampled a pixel per corner so a wrong
direction cannot pass. Red on the base: `image_size` (64, 32), frame
64x32, corners ["red","green","blue","yellow"] -- the stored layout,
orientation ignored. Green after: (32, 64) and ["yellow","red","green",
"blue"], with 180, anticlockwise and no-turn each asserted in its own
direction, all four mirrors refused by name, and the export portrait
with no matrix of its own. `cargo test -p engine --test images` 8/8.

2026-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.
copy(exact): the copy door keeps the pixel aspect, and an mp4 copy refuses itAhmet Kaan Gümüş · 312b13e
copy(exact): the copy door keeps the pixel aspect, and an mp4 copy refuses it

ffmpeg's own copy behaviour: the blocks are the source's coded pixels
and the aspect travels with them as container metadata. The Matroska
copy door now does that: CopyPlan compares CODED to CODED (the display
comparison would refuse every anamorphic source and then lie about the
track it wrote), declares the source's coded pair, and writes the
source's aspect as Display* elements -- unit 4, the SAR itself, the
ratio this engine's reader reproduces exactly. A square copy writes no
Display* at all, so every existing copy's header is byte-identical.

The mp4 copy cannot carry it: the sample entry this writer produces has
no pasp box, and a header that declares the coded pair while the pixels
are drawn 4/3 wide lies about its own shape. Refused by name -- 'a copy
would lose the pixel aspect' -- before the container's codec sentence,
so the export re-encodes into the square pixels the picture is drawn at
(mp4 export measured: 1920x1080, square).
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.
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-19

💄 ui(settings,export): settings is a centred modal; the budget goes below a megabitAhmet Kaan Gümüş · 9085e57
💄 ui(settings,export): settings is a centred modal; the budget goes below a megabit

- settings page reframed from the full-width below-picture sheet to a
  centred modal card (480px plate of one tabbed column's measure,
  viewport-capped with the rows scrolling, click-away/esc close
  unchanged) — the sheet covered the timeline; new layout guard pins
  the geometry
- export budget floor drops from 1 Mbps to 100 kbps in both the engine
  (MIN_BITRATE) and the app (BPS_MIN), so a typed '600k' travels as
  0.6 Mbps instead of being silently rewritten to 1.0; pins re-seated
  at the new floor, wheel steps unchanged, no-session fallback keeps
  its 6 Mbps meaning as a literal
- DESIGN.md §11.6 names the settings modal as an accepted occlusion
  exception, per its own 'the document changes explicitly' rule

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

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

Merge branch 'lane-mp3vorbis-swap' (f68f46d): MP3 and Vorbis encode seats are ec-mp3 / ec-vorbis -- rusty_mp3 and rusty_vorbis leave the tree. Vorbis: strictly better operating point (r 0.9968 vs 0.9947, +3.1 dB, same size, par with ffmpeg q5), pre-roll/granule corrections obsolete (lag-0 sample-exact through symphonia), encode ~1.2-1.5x faster. MP3: gapless-exact (incumbent was +648 samples), quality reproduced equal-or-better. DISCLOSED TRADE: MP3 encode is ~7x realtime stereo (428.6ms/3s music, 4188.5ms/30s real) vs rusty_mp3's 147-283x -- a 2h film's stereo track exports in ~17 min vs ~48s, and MP3 is an audio-only export so encode IS the wall; single-thread vs single-thread (rusty_mp3 is thread_local-only). lane-ecmp3-perf armed in the same batchAhmet Kaan Gümüş · 423536a
Merge branch 'lane-mp3vorbis-swap' (f68f46d): MP3 and Vorbis encode seats are ec-mp3 / ec-vorbis -- rusty_mp3 and rusty_vorbis leave the tree. Vorbis: strictly better operating point (r 0.9968 vs 0.9947, +3.1 dB, same size, par with ffmpeg q5), pre-roll/granule corrections obsolete (lag-0 sample-exact through symphonia), encode ~1.2-1.5x faster. MP3: gapless-exact (incumbent was +648 samples), quality reproduced equal-or-better. DISCLOSED TRADE: MP3 encode is ~7x realtime stereo (428.6ms/3s music, 4188.5ms/30s real) vs rusty_mp3's 147-283x -- a 2h film's stereo track exports in ~17 min vs ~48s, and MP3 is an audio-only export so encode IS the wall; single-thread vs single-thread (rusty_mp3 is thread_local-only). lane-ecmp3-perf armed in the same batch

# Conflicts:
#	Cargo.lock
#	crates/engine/Cargo.toml
#	crates/engine/src/caps.rs
#	crates/engine/src/export.rs
Merge branch 'lane-h265enc-swap' (4808c4a): the HEVC encode seat is ec-h265 and oxideav-h265 leaves the tree (47+ vendor files, conformance-window patch with them -- ec-h265 self-pads and writes the crop) -- reviewer-executed validity: +1.22 dB PSNR-Y at -25.6% bytes vs the old seat at qp40 (+1.02 dB at -11.1% qp27), export wall 1.07-1.10x, mkv+mp4 decode back through the VA-API plugin seat, frame-parallel batching preserved byte-identicallyAhmet Kaan Gümüş · 49b300a
Merge branch 'lane-h265enc-swap' (4808c4a): the HEVC encode seat is ec-h265 and oxideav-h265 leaves the tree (47+ vendor files, conformance-window patch with them -- ec-h265 self-pads and writes the crop) -- reviewer-executed validity: +1.22 dB PSNR-Y at -25.6% bytes vs the old seat at qp40 (+1.02 dB at -11.1% qp27), export wall 1.07-1.10x, mkv+mp4 decode back through the VA-API plugin seat, frame-parallel batching preserved byte-identically

# Conflicts:
#	Cargo.toml
#	crates/engine/src/caps.rs
🔁 feat(video): the HEVC encode seat is the native ec-h265 — oxideav-h265 leaves the treeAhmet Kaan Gümüş · 4808c4a
🔁 feat(video): the HEVC encode seat is the native ec-h265 — oxideav-h265 leaves the tree

The vendored OxideAV intra encoder is replaced by the project's own ec-h265,
intra-only by construction: every picture an IDR carrying its own
VPS/SPS/PPS, so the seat's contract — an intraframe master, every frame a
cut point, even dimensions, a bitrate row mapped to a constant QP through the
same 0.6 bpp anchor — is unchanged. Named headroom deliberately not taken:
the encoder's per-picture target-bits correction pass, 64x64 CTBs and the
chroma rate-distortion mode search.

The seat keeps the frame-parallel shape of the one it replaces: a batch of
display-size planes codes on one lane encoder each, and each encoder's WPP
wavefront splits the cores the lanes leave over. Coding one picture at a
time on every core was measured at 0.63x the old export wall — the batching
is what keeps decode and render fed while a batch codes.

Quality, identical 300-frame 1920x792 film window, matched constant QP,
ffmpeg-decoded, ffmpeg PSNR/SSIM against the source:

  QP 40: 38.05 dB PSNR-Y / 0.9434 SSIM-Y at 2.14 MB
         (was 36.83 dB / 0.9286 at 2.88 MB — +1.22 dB for 25.6% fewer bytes)
  QP 27: 45.10 dB / 0.9811 at 8.35 MB
         (was 44.08 dB / 0.9773 at 9.40 MB — +1.02 dB for 11.1% fewer bytes)
  libx265 intra control at the same QPs: 39.87 dB / 46.37 dB

Perf: export wall over a 300-frame 1080p30 window, 5-sample bench, quiet
box: 12.6-13.0 fps against the old seat's 11.8 (1.07-1.10x).

Bitstream validity: the exports reopen through this project's demuxer in
both containers and decode back to pictures through the VA-API plugin's
HEVC seat (mkv and hvc1); ffmpeg decodes every witness without a complaint
and the 1080p conformance-window export still states 1920x1080 through the
SPS. Suites green: hevc, hevc_export (incl. the hardware and software
roundtrip witnesses), hevc_mkv, hevc_hvc1, export, export_color, backends,
opus_export, lib (373); cargo check -p engine --all-targets with zero
warnings.
🔁 feat(audio): the MP3 and Vorbis encode seats are the native ec-mp3 / ec-vorbisAhmet Kaan Gümüş · f68f46d
🔁 feat(audio): the MP3 and Vorbis encode seats are the native ec-mp3 / ec-vorbis

The two registry-crate encoder seats (rusty_mp3 0.6, rusty_vorbis 0.1.1)
leave the tree; both formats encode through the codec family's own crates
(path deps, same boundary ec-opus/ec-ac3 already cross).

MP3 (CBR per the card's rate rows): same seat contract, same
Mp3EncoderConfig field names, call sites unchanged. A/B on identical
16-bit PCM (suite fixtures + a 30 s 44.1 kHz stereo music decode),
outputs decoded through symphonia: correlation 0.9994-0.9998 against the
incumbent's 0.9980-0.9991 at the same 192 kbps, PSNR +5..+7 dB, and the
decoded length lands exactly on the mix (the old seat ran 180 samples
long with a 1057-sample shift the gapless tag only partly hid).

Vorbis: the seat's quality knob alone saturates below the incumbent's
operating band, so write_ogg drives the encoder the way its own rate
gates are measured -- rate loop started at quality 0.85 and held to a
128 kbps target. At the incumbent's own 0.85 operating point (123.8 kbps
actual on the music clip, correlation 0.9947) the new seat reads
129.0 kbps actual at correlation 0.9968, +3.1 dB PSNR; against ffmpeg's
libvorbis -q 5 it is par at the same rate (0.9968 vs 0.9973). Every
export decodes to exactly the timeline's frame count, correlation peak
at lag zero.

That measurement retires write_ogg's workaround: the old seat advanced
its granule a hop early and overran the tail, so the function carried a
1024-sample pre-roll and two granule corrections around it. ec-vorbis
reports spec granules and clamps its final one to the sample count fed,
so the pre-roll, the per-packet shift and the manual tail declaration are
deleted. Mono stays dual mono (bit-identical L/R, worst |L-R| = 0
measured) because the format row promises stereo, not because the encoder
refuses mono as the old seat's did.

Perf, named: MP3 encode wall is 0.05x the old seat on the 30 s clip
(4.3 s vs 0.20 s CBR; the old shim encoded blocks across all cores, the
new seat is single-threaded sequential) -- the price of the quality and
gapless-exactness above; Vorbis at the seat's operating point is 1.4x
faster than the old seat (49 ms vs 69 ms per 30 s). audio_export and
backends suites green (14 + 8), export lib tests green, cargo check -p
engine --all-targets zero warnings; lock carries no rusty_mp3/rusty_vorbis
stanza.

2026-09-12

♻️ refactor(engine): the AAC encode seat is ec-aac -- export.rs's encode_audio and the muxer's tone harness speak ec_aac::AacEncoder on the seat's old contract (interleaved f32 push_pcm, raw raw_data_block packets one frame long, the sf_index_for_rate refusal the export turns into a user-facing message, ASC rebuilt from AacTrackParams), the caps row and both SW-encode labels read ec-aac, and a new mux witness round-trips seat-encoded mono, stereo and 5.1 through the project's own decode door (symphonia's reader for the pair, the family decoder for 5.1, folded to stereo as the door's contract states). A/B on identical synthetic program -- mono 44.1k 128k, stereo 44.1/48k 256k, stereo 48k 96k, 5.1 48k 512k, every output ADTS-framed and ffmpeg-decoded, alignment by envelope correlation with an ffmpeg-native control column: ec-aac correlates at or above the incumbent on every row (mono 0.9674 vs 0.9564, stereo 96k 0.9445 vs 0.8458, 5.1 0.6050 vs 0.6007) and matches or beats ffmpeg's own encoder at matched actual rate; cost is +4-6% actual bits at the same target and a slower encode wall (single-threaded vs rusty_aac's frame-parallel finish: 2.0-3.7x on one core, 5.9-10.2x as-shipped on this box) -- named here per the perf bar. rusty_aac itself leaves in the next commit. Export and capability suites green, -p engine --all-targets 0 warningsAhmet Kaan Gümüş · 7ed056a
♻️ refactor(engine): the AAC encode seat is ec-aac -- export.rs's encode_audio and the muxer's tone harness speak ec_aac::AacEncoder on the seat's old contract (interleaved f32 push_pcm, raw raw_data_block packets one frame long, the sf_index_for_rate refusal the export turns into a user-facing message, ASC rebuilt from AacTrackParams), the caps row and both SW-encode labels read ec-aac, and a new mux witness round-trips seat-encoded mono, stereo and 5.1 through the project's own decode door (symphonia's reader for the pair, the family decoder for 5.1, folded to stereo as the door's contract states). A/B on identical synthetic program -- mono 44.1k 128k, stereo 44.1/48k 256k, stereo 48k 96k, 5.1 48k 512k, every output ADTS-framed and ffmpeg-decoded, alignment by envelope correlation with an ffmpeg-native control column: ec-aac correlates at or above the incumbent on every row (mono 0.9674 vs 0.9564, stereo 96k 0.9445 vs 0.8458, 5.1 0.6050 vs 0.6007) and matches or beats ffmpeg's own encoder at matched actual rate; cost is +4-6% actual bits at the same target and a slower encode wall (single-threaded vs rusty_aac's frame-parallel finish: 2.0-3.7x on one core, 5.9-10.2x as-shipped on this box) -- named here per the perf bar. rusty_aac itself leaves in the next commit. Export and capability suites green, -p engine --all-targets 0 warnings
🛡️ feat(engine): the software H264 export refuses sub-macroblock pictures by nameAhmet Kaan Gümüş · 0e9d3b7
🛡️ feat(engine): the software H264 export refuses sub-macroblock pictures by name

H.264 codes 16x16 macroblocks and ec-h264's floor is the macroblock
itself, where the retired encoder took any positive even size. Named at
the seat where a card can show it -- the same shape as the odd-dimension
refusal -- instead of surfacing the encoder's error from inside a
running export. Found by review during the seat swap.
⚡ perf(engine): the software H264 export codes Main-profile CABAC, 8x8 offAhmet Kaan Gümüş · 02e2308
⚡ perf(engine): the software H264 export codes Main-profile CABAC, 8x8 off

Measured at the swap, 720p, all cores: the 8x8 transform is half the pure
encode (35.1 ms/frame against 17.2), worth at most 0.7 dB BD-PSNR the
Constrained-Baseline seat it replaced never had; CABAC stays (faster than
CAVLC here -- fewer tokens to code -- and smaller). Export wall on a
300-frame 720p window, hardware decode both sides, idle machine: rusty
65.2 fps against ec-h264 57.6 -- 0.877x as re-measured by review
(0.884x in-lane), still short of the 0.9x gate and reported as such; the rest of the delta is the encoder's sub-pel motion
and CABAC decision cost, which is the encoder lane's to reclaim, not a
knob left unpulled here (threads swept 4/6/8/12, CABAC/CAVLC, both
presets' cheaper arm already picked).

Quality at the seat's ~2.7 Mbps CBR, 300-frame window
(reviewer-reproduced, both seats driven directly, ffmpeg-decoded):
PSNR-Y 41.58 against rusty's 40.51, SSIM 0.9903 against 0.9842, ~2%
fewer bits and tighter rate fidelity (rusty overshot to 3.0 Mbps on hard
content).
♻️ 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).
✨ feat(engine): both Opus seats are ec-opus natives — the library pair is goneAhmet Kaan Gümüş · 597e096
✨ feat(engine): both Opus seats are ec-opus natives — the library pair is gone

The decode seat (SymDecoder::Opus) and the encode seat (encode_opus) move
off ruopus 0.1.2 / opus-rs 0.1.26 onto the codec family's own ec-opus, the
first path dependency across into the sibling edith_codecs workspace. Both
replaced crates leave Cargo.lock with everything they pulled in.

What the swap is measured to do, not hoped to do:

* decode equivalence: a real 5.1 stream decodes to correlation 1.000000
  between the two decoders, and the film seek witness lands on the same
  samples it always did — the 312-sample pre-skip corrections hold unchanged,
  so no constant moved.
* the 128 kbps cap goes to 320, the Sound row's top: opus-rs's packets above
  ~165 kbps were noise to every decoder but its own (re-measured: 0.011
  correlation at 320 through BOTH decoders), and that cliff is the only thing
  the old ceiling stood on. ec-opus's 320 kbps packets read back identically
  through ruopus and through ec-opus. Fidelity at the top of the new band:
  0.9999 (stereo 320), mono 0.9999-1.0000 (was 0.9983-0.9987 at 128).
* mono leaves as Opus now. opus-rs mis-encoded mono at every rate, which is
  what kept a mono mix on the AAC path; a_mono_mix_leaves_as_opus_too pins
  the new behavior and the export.rs unit suite round-trips mono at 96 and
  256. The muxer's family-0 OpusHead needed no change: it already wrote
  mono.
* performance, measured honestly (release, min-of-7 alternating, against
  ruopus WITH the spectrograms/FFT backend the product actually shipped):
  ec-opus is ~1.4-1.7x SLOWER on every path — 5.1 decode 246x realtime
  where ruopus managed 407x; the export seat (encode plus its mandatory
  fidelity decode) 0.27 s against the old seat's 0.18 s per 30 s of stereo.
  Both stay far past realtime (>=88x), so nothing is user-perceptible, but
  the >10% bar is not met numerically; the swap stands on the
  dependency-freedom goal, and the family decoder has the headroom to close
  the gap. KNOWN-OPEN, not silently accepted.
✨ 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-27

✨ feat(export): Exact quality row copies the source's own coded pictureAhmet Kaan Gümüş · 49dbed8
✨ feat(export): Exact quality row copies the source's own coded picture

Adds Quality::Exact to the export card: wherever CopyPlan already says a
copy is exactly what the timeline says, the file leaves as the source's
own bytes. exact_refusal names why not (wrong container, edit forces a
re-encode) before the button is pressed and again inside run(), so the
card and the worker can never disagree.

2026-08-26

🐛 fix(app,engine): pay debts — audio-only fallbacks, panic-proof proxy, .part sweepAhmet Kaan Gümüş · b05a649
🐛 fix(app,engine): pay debts — audio-only fallbacks, panic-proof proxy, .part sweep

Twelve debts paid in one batch:

- engine: NoVideoTrack fallback at every video door — open_stream,
  open_project scaffold, and import() now route a video-extension file
  whose header holds no picture to the audio-only path instead of
  refusing (argv open, saved-project reload, and library import).
- engine: proxy/export worker wrapped in catch_unwind — a decoder panic
  settles the shared slot with Err instead of stranding Making/Cancelling.
- vendor/cros-codecs: AV1 setup_shear multiplies checked — malformed warp
  params are a parse error, not a process abort (live-proven on an AV1 film:
  clean PROXY FAILED notice, slot released, app alive).
- engine: startup sweep of orphan proxy .part files.
- app: Player::has_video probe cache — lane_refuses gates drops on the
  probed kind, not the extension; Silences hidden on soundless clips;
  audio import toast names rate/channels/length; stale no-session proxy
  label cleared.
- tests: audio-only mp4 fixture + gen_fixtures.sh line, 2 engine
  NoVideoTrack tests, toast/lane/view cases (246 bin + 14 audio_files).

Harness-proven this batch (runs 20260826-2306..2315): split-at-playhead
with undo, lane-remove mouse door, fade-out drag, argv audio-only open,
AV1 proxy clean failure.
✨ 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-22

🐛 fix(engine): H.264 level_idc from Table A-1 on the software seat tooAhmet Kaan Gümüş · 4a00a35
🐛 fix(engine): H.264 level_idc from Table A-1 on the software seat too

rusty_h264 left level_idc at its default 3.0, out of spec above 720p30.
The Table A-1 lookup moves from the plugin into engine::export so both
seats write the same byte; the plugin maps it onto the vendored enum.
Verified: a 2560x1440@30 software export now carries level 5.0.

Also vendors proc-macro-error2 2.0.1 with its `pub use proc_macro;`
re-export dropped (E0365 future-incompat, the one warning left on a
workspace build; nothing names that re-export).

2026-08-20

2026-08-19

🐛 fix(engine): fades reach exported and played-back audioAhmet Kaan Gümüş · 9ec26f6
🐛 fix(engine): fades reach exported and played-back audio

Two bugs: `forces_encode` never checked a clip's own fade, so the
default Web MP4 copy path silently dropped fades from the exported
AAC track. Worse, `Fade`'s frame counts are timeline (fps) frames but
`Fade::apply` multiplies audio-rate sample blocks; unconverted, a
fade's threshold was crossed a few milliseconds into any clip, so a
fade-out muted the rest of the segment outright and a fade-in finished
before an ear (or a 100ms RMS window) could catch it. `Fade::scaled`
now re-counts a fade at the mix's own sample rate the moment the audio
session learns it, which also fixes the same bug in live preview.
✨ feat(engine): a dissolve renders in the playback preview tooAhmet Kaan Gümüş · 3e66b40
✨ feat(engine): a dissolve renders in the playback preview too

The preview used to hard-cut where an export blends -- try_frame now opens
B's own decoder (graded and placed at B's own start, mirroring export's
Dissolve) once the playhead reaches the tail's dissolve window, and blends
its BGRA picture over A's with the same dissolve_weight ramp export uses.
One choke point covers both playing and scrubbed/seeked frames, since both
drain try_frame the same way.
✨ feat(engine): a dissolve renders in export, blended frame by frameAhmet Kaan Gümüş · fc86f32
✨ feat(engine): a dissolve renders in export, blended frame by frame

The last transition_out frames of a clip that still abuts its
successor on the same video lane decode B's head on a second,
parallel decoder and blend it into A's tail with blend_i420, ramping
0->1 across the window; adjacency is re-checked at render time so a
transition_out left stale by a trim or a delete plays as the hard cut
it now is. A live dissolve forces the whole video track through the
encoder -- CopyPlan's stream-copy path is all-or-nothing already, so
one dissolve on the timeline costs the encode CopyPlan would
otherwise have skipped.

Playback preview and the fixture-backed encode test are follow-up
work; this lands the plan-level tests (dissolve_weight, the window's
own source/in_frame/start, and the stale-adjacency hard-cut) since the
worktree has no assets/ to build a decodable fixture from.
🐛 fix(app): the export card tells the truth about a ranged exportAhmet Kaan Gümüş · 906e7de
🐛 fix(app): the export card tells the truth about a ranged export

The size estimate and the audio-codec label both ignored the marked
range (a ranged export re-encodes; the card said copy and quoted the
whole timeline's size). The RANGE duration is computed from the frame
count instead of float seconds, and the speed card's row joins it —
same truncation class. The range band gets 2px boundary ticks so it
reads over the played fill. bench.rs learns export::start's fifth
argument, closing the arity sweep over examples.
✨ feat(engine): per-clip audio fades and adjacency crossfade (edith 18)Ahmet Kaan Gümüş · 4e4ec16
✨ feat(engine): per-clip audio fades and adjacency crossfade (edith 18)

# Conflicts:
#	crates/engine/src/export.rs
✨ 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.
✨ feat(export): mark an in/out range and export just thatAhmet Kaan Gümüş · a5c0bc7
✨ feat(export): mark an in/out range and export just that

i marks the in point and o the out, on the playhead; ctrl+u clears the
mark. The ruler shows the marked stretch as a translucent band and the
export card states it above the button. Session state only, never
saved to a .edith.

The engine side finishes what a capped predecessor started: run_audio
(the WAV/FLAC/MP3/OGG path) now offsets its segments and clips its
frame count to the range the same way encode_audio already did.
✨ feat(engine): a project can name its own sample rateAhmet Kaan Gümüş · 31981de
✨ feat(engine): a project can name its own sample rate

.edith goes to v17 with an optional samplerate line; the session carries
it, save/load round-trip it, and the one audio-open seam every consumer
shares (open_multi_streams_speed_at) conforms all segments to the named
rate — playback rebuild and both export encoders inherit it for free.
Proxies keep their film's own rate. A v16 file loads with the rate
unset, meaning derived-from-source as before.

2026-08-14

🐛 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.
🐛 fix(engine): the export stops with the last picture, caption or no captionAhmet Kaan Gümüş · 64e09f9
🐛 fix(engine): the export stops with the last picture, caption or no caption

A caption hanging past the media held the timeline open and the picture loop
walked it: 312 encoded frames under a 240-frame delivery, 72 of them black,
the copied sound padded to match, and the plan card saying cues were "cut off
there" of a file three seconds longer than it said.

`export_spans` is now the one place that end is decided -- the composite walk
cut to `media_frames` -- and both the encoding loop and the copy plan take it;
`copy_audio` drops the trailing gap the same walk leaves on its play list.
Playback still walks `timeline_frames`, so the transport parks on the tail.