forge
Explore
Log in

Don't you dare go Hollow

Commits

Commits on mainFiltered to Cargo.lockClear filter

2026-11-25

2026-11-16

⚡ 10-bit HEVC hardware export 4x faster, output bit-identical: pipelined encode/decode-ahead, zero-copy P010 dmabuf for caption-free spansAhmet Kaan Gümüş · 902be04
⚡ 10-bit HEVC hardware export 4x faster, output bit-identical: pipelined encode/decode-ahead, zero-copy P010 dmabuf for caption-free spans

- hw encoder on its own thread; direct u16 shm copies (bytemuck)
- hw-child decode-ahead for wide frames; T_NEXT_DMA16 exports P010 to the encoder child
- spans split at caption/title boundaries; quiet spans stay on the GPU
- DMA header count read at the right offset (every hw decode had fallen to software)
- hw_fallback and hw_midgop_seek take the hardware seat: the failure hook no longer leaks across parallel tests

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

🐛 fix(audio): coalesce the visualizer wheel drag like the colour barsAhmet Kaan Gümüş · ed847d4
🐛 fix(audio): coalesce the visualizer wheel drag like the colour bars

One pointer sample wrote one edit(Dirty::Picture) -> start_picture: a full
picture rebuild at the playhead per sample, so a drag queued a reopen per
step and the window froze for the sum -- the shape drag_color's own comment
already names. The wheel now holds a sample while a rebuild is in flight
(stash_or_write, busy = a pending reseek), flushes it on release, and draws
its mark from the held sample so the hand leads the picture.

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

🔁 feat(audio): the AC-3/E-AC-3 decode seat is the native ec-ac3Ahmet Kaan Gümüş · 9fab7c9
🔁 feat(audio): the AC-3/E-AC-3 decode seat is the native ec-ac3

oxideav-ac3 leaves the tree. One decoder reads both syntaxes, dispatching
per packet on bsid, and hands back interleaved f32 -- the seat asks for its
own A/52 §7.8.2 stereo fold on anything wider than mono, per-position
coefficients from each frame's own acmod and mix levels, so no width is
refused any more (the 2.1-at-3ch passthrough refusal dies with the library)
and the mono digital-silence corner-cut is gone with it.

Witnesses on real content, identical packets, old seat vs new:
- AC-3 5.1 film: per-channel correlations 0.99965-0.99999, rms ratios
  1.001; the residual is the format's unspecified dither noise -- against
  ffmpeg's own decode both decoders sit equally close, and the two spots
  where they did not agree are OLD-seat deviations (the 2.0 rematrixing
  decode: 0.92/0.76 vs ffmpeg, the new seat 0.99997; the LFE: 0.976 vs
  ffmpeg, the new seat 1.000000).
- E-AC-3 5.1 film: correlations >= 0.99998 on all six channels, rms 1.000.
- Decode speed 1.64-1.68x the old seat (min-of-7, ~320x realtime 5.1).
- Named coverage edge, refused by name at open, not silently: Annex E
  dependent substreams and enhanced coupling (7.1 DD+ assembled as
  5.1-plus-dependents) -- oxideav walked those, ec-ac3 refuses them.
  Every single-substream AC-3 and E-AC-3 track decodes.

New film witness file tests/audio_ac3_film.rs (seek-landing + ffmpeg
correlation on a real AC-3 5.1 film and a real E-AC-3 5.1 film, mirroring
the Opus/AAC film witnesses), real_library.toml.example documents the
ac3_51_film key. caps row and the codec-table comment follow the seat.
🔥 chore(engine): rusty_aac leaves the tree -- the encode seat was its last job and ec-aac took it in the previous commit; vendor/rusty_aac git-rm'd, the [patch.crates-io] line and the workspace exclude row go with it, Cargo.lock carries zero rusty_aac entries (its lock stanza was dependency-free, so nothing else moves), and the manifest keeps the record in the rusty_h264-common style: a seventh vendor whose whole entry left with its last seat, its decoder IMDCT patch (N/4-point FFT through dsp::dct4, 40x the matrix version) having served the decode seat ec-aac replaced first. Seat comments read past tense. Post-removal: -p engine --all-targets 0 warnings, lib suite 375/375, export 8/8Ahmet Kaan Gümüş · cbad1fe
🔥 chore(engine): rusty_aac leaves the tree -- the encode seat was its last job and ec-aac took it in the previous commit; vendor/rusty_aac git-rm'd, the [patch.crates-io] line and the workspace exclude row go with it, Cargo.lock carries zero rusty_aac entries (its lock stanza was dependency-free, so nothing else moves), and the manifest keeps the record in the rusty_h264-common style: a seventh vendor whose whole entry left with its last seat, its decoder IMDCT patch (N/4-point FFT through dsp::dct4, 40x the matrix version) having served the decode seat ec-aac replaced first. Seat comments read past tense. Post-removal: -p engine --all-targets 0 warnings, lib suite 375/375, export 8/8
♻️ refactor(engine-hw): the VP8 decode seat is ec-vp8 native -- libvpx and its hand-written FFI are deleted, the plugin links the decoder as ordinary Rust (56 ec_vp8 symbols, no DT_NEEDED, no dlopen); VpxSession keeps its five-verb boundary (init/decode/flush/get_frame, destroy now the drop of an owned decoder) and everything above it is untouched; CAP_VP8 lights unconditionally and still never reads as a GPU seat; A/B byte-exact against the libvpx seat on the 1280x720 fixture (60/60 frames), the 2560x1321 odd-size webm (270/270) and a two-pass auto-altref stream (90/90 shown, 6 hidden produce none, seek landings identical); vp8 twins 4/4, capability_matrix+backends+caps green, --all-targets 0 warningsAhmet Kaan Gümüş · 36bd0e7
♻️ refactor(engine-hw): the VP8 decode seat is ec-vp8 native -- libvpx and its hand-written FFI are deleted, the plugin links the decoder as ordinary Rust (56 ec_vp8 symbols, no DT_NEEDED, no dlopen); VpxSession keeps its five-verb boundary (init/decode/flush/get_frame, destroy now the drop of an owned decoder) and everything above it is untouched; CAP_VP8 lights unconditionally and still never reads as a GPU seat; A/B byte-exact against the libvpx seat on the 1280x720 fixture (60/60 frames), the 2560x1321 odd-size webm (270/270) and a two-pass auto-altref stream (90/90 shown, 6 hidden produce none, seek landings identical); vp8 twins 4/4, capability_matrix+backends+caps green, --all-targets 0 warnings
Merge branch 'lane-av1-seat' (1213004): AV1 joins H264 with a native software decode seat -- ec-av1 per-chunk whole-stream decode, byte-exact against the VA-API seat on 8-bit and 10-bit fixtures (60/60 frames, 0 differing bytes), seek-landing equivalence, refusal-in-words posture, AV1 imports work with no plugin at 1.70x realtime at 1080p-classAhmet Kaan Gümüş · ccfe87c
Merge branch 'lane-av1-seat' (1213004): AV1 joins H264 with a native software decode seat -- ec-av1 per-chunk whole-stream decode, byte-exact against the VA-API seat on 8-bit and 10-bit fixtures (60/60 frames, 0 differing bytes), seek-landing equivalence, refusal-in-words posture, AV1 imports work with no plugin at 1.70x realtime at 1080p-class

# Conflicts:
#	Cargo.lock
#	crates/engine/Cargo.toml
✨ feat(engine): a native AV1 decode seat — ec-av1 takes AV1 sources with no plugin in the roomAhmet Kaan Gümüş · 875b31a
✨ feat(engine): a native AV1 decode seat — ec-av1 takes AV1 sources with no plugin in the room

The software arm of decode.rs grows a second seat beside ec-h264: probe(),
open_worker()'s plugin gate and run_span() all take Codec::Av1 as a
software-covered codec, falling back to ec-av1 exactly where H.264 falls
back to ec-h264. VE_SW=1 pins it, Backend::Software reports it.

The seat feeds ec-av1's whole-stream door the way the demuxer assembles
AV1 anyway: access units from the landing sync sample to the next one are
one chunk (the sequence header the demuxer injects ahead of every sync
sample is the boundary marker), and each chunk is a legal random-access
stream that decodes to its end — so hidden reference frames drain and the
reorder tail lands. A span stops decoding at its last asked-for picture
via a sink Eof sentinel; a refusal out of ec-av1 fails the span in words
mid-film, the pictures decoded so far standing, never garbage. u16 planes
narrow at the seat: 0..=255 casts, 10-bit downshifts by two — the same
truncation the plugin's P010 read-back performs, so both seats hand the
renderer byte-identical planes.

Witnesses: plugin vs seat frame-for-frame byte-exact on test_av1.mkv and
on the 10-bit twin (frame 30, 0 differing bytes both); seek-landing
equals linear on the software seat across a keyframe interval; a
crafted broken-GOP file (keyframe-flagged inter frame) is refused by
name — "no saved CDF state" — with the first GOP standing and the
channel closing clean.

Perf (release, funnel incl. demux+convert, identical config both sides):
VA-API 2.0x the seat on 720p8 (100 vs 51 fps), 1.8x on 720p10 (95 vs 53),
4.9x on a 1920x792 10-bit film (199 vs 41 fps, seat 1.70x realtime),
3.5x on a 3840x1608 10-bit film (22 vs 6.2 fps, seat 0.26x realtime —
below 1x, but so is the plugin's own 0.92x there: the BGRA conversion
dominates that funnel). 1.70x realtime at 1080p-class clears the
threads-wiring bar, so EC_AV1_THREADS stays opt-in.

demux::needs_plugin's AV1 arm now names the export path (whose software
decoder stays H.264-only) instead of claiming no software decoder exists;
bit_depth()'s doc gains its second reader.
✨ feat(engine): the multichannel AAC decode seat is an ec-aac native — rusty_aac stays encoder-onlyAhmet Kaan Gümüş · fc0891f
✨ feat(engine): the multichannel AAC decode seat is an ec-aac native — rusty_aac stays encoder-only

- the >2-channel seat (a film's 5.1/7.1 track, symphonia refusing anything
  wider than stereo) now decodes with the family's own ec-aac; the same
  construction and decode call sites, the same seat shape, the same film
  channel order FL FR FC LFE BL BR the downmix folds
- witness: fold correlation +1.00000 against the retired rusty_aac decoder on
  2000 identical AUs of a 5.1 film remux (max|diff| 5.96e-8,
  RMS ratio 1.0000, channel matrix diagonal-dominant); stereo fixture
  +1.00000 / 5.46e-4 (PNS noise seed differs); new ffmpeg-correlated film
  witness a_seek_into_real_five_one_aac_film... scores 0.929/0.858/0.922
  landing on the asked second (threshold 0.5)
- perf: 12.0-13.2 Msamples/s (250-275x realtime) vs rusty 2.8-3.6 (58-75x) at
  5.1 on identical packets; 26-32 Msamples/s (580-719x) vs 6.7-7.7 (151-174x)
  on the stereo fixture -- ~3.5x the retired decoder, bar was >=0.9x
- known behaviour delta, honest in both directions: HE-AAC v1 (SBR) now
  reconstructs at the extension rate where rusty band-limited everything to
  the core Nyquist; PS streams decode core-only at the core rate in BOTH
🔥 chore(engine): rusty_h264 leaves the treeAhmet Kaan Gümüş · 17b5566
🔥 chore(engine): rusty_h264 leaves the tree

The encode seat was the last linker; the facade, its -common subcrate and
the vendored patch that declawed rusty_alloc all go with it. The SEGFAULT
history (rusty_alloc installing itself as the process global allocator and
dying on a decode worker's first allocation, 2026-08-13) stays written
down, past tense, in both manifests. Cargo.lock carries no rusty_h264,
rusty_h264-common or rusty_alloc entry.
Merge branch 'lane-h264-swap' (e24fe61): the software H264 decode seat is ec-h264 native via the ec_core registry -- and the seat now emits true DISPLAY order (the rusty corner-cut scrambled B-picture content); byte-exact vs rusty on CAVLC and CABAC+B fixtures, perf 1.02-1.57x on the gate classes, 0.80x on B-frame CABAC (the DPB reorder price; lane-ech264-perf queued); rusty_h264 stays for the ENCODE seat onlyAhmet Kaan Gümüş · c612711
Merge branch 'lane-h264-swap' (e24fe61): the software H264 decode seat is ec-h264 native via the ec_core registry -- and the seat now emits true DISPLAY order (the rusty corner-cut scrambled B-picture content); byte-exact vs rusty on CAVLC and CABAC+B fixtures, perf 1.02-1.57x on the gate classes, 0.80x on B-frame CABAC (the DPB reorder price; lane-ech264-perf queued); rusty_h264 stays for the ENCODE seat only

# Conflicts:
#	Cargo.lock
#	crates/engine/Cargo.toml
#	crates/engine/src/decode.rs
#	crates/engine/src/demux.rs
♻️ refactor(engine): the software H.264 seat decodes with ec-h264Ahmet Kaan Gümüş · e24fe61
♻️ refactor(engine): the software H.264 seat decodes with ec-h264

decode::run leaves `rusty_h264` for `ec_h264::H264Decoder` (path dep on
../../edith_codecs, `ec_core` beside it for the registry contract):
packets in over the demuxer's Annex-B access units, frames out through
send_packet/receive_frame with a flush at end of stream so the reorder
delay releases its tail.

Semantics: the old loop emitted pictures in decode order and counted
access units -- a corner-cut that only held for Baseline, and scrambled
exactly the B-picture streams it could not reorder. ec-h264 bumps the
DPB (clause C.4.5.3) and hands pictures back in display order, so the
landing index the demuxer's seek reports and the label each frame ships
with now count the same thing: timeline positions, which the transport,
skip_for_speed and the hardware backend already assumed. Witnessed on
test_high.mp4 (B pictures): the seat delivers 0..150 in order where the
old seat delivered the same frames reshuffled and mislabelled.

Tests: tests/sw_backends.rs is the byte-exactness witness -- ec-h264
against rusty_h264 (kept as the independent oracle) on CAVLC Baseline
and CABAC High fixtures, decode order per position and display order as
a multiset, with the reorder engaged only where the stream reorders;
hw_decode's software halves (seek_matches_linear, range_stops_at_end,
hardware_matches_software_on_frame_30) pass against the VA-API backend.

Throughput (raw demux+decode, idle machine, best of three): 1.52x
rusty_h264 on a 1080p Main export and 1.57x on a 4K Main render, 1.02x
on a 1440p High screen recording, 1.17x on CAVLC Baseline; 0.80-0.81x
on the two B-picture CABAC streams measured -- the measured price of
the full DPB the old seat skipped. cargo check -p engine: 0 warnings.

rusty_h264 stays linked for the export encode seat (Encoder,
EncoderConfig, Preset, YuvFrame) and export's own SwDecoder, so the
dep, the rusty_h264-common vendored patch (the rusty_alloc
global_allocator landmine) and their Cargo.lock entries are load-bearing
until that seat moves to ec_h264::Encoder; caps names the split honestly
('ec-h264 / rusty_h264').
✨ feat(engine): 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-09-06

🐛 fix(engine): a QuickTime .mov keeps its AAC — read v1/v2 sound descriptionsAhmet Kaan Gümüş · 7fbbd0f
🐛 fix(engine): a QuickTime .mov keeps its AAC — read v1/v2 sound descriptions

A Resolve export (qt brand) opened with no sound: mp4 0.14
reads the mp4a sample entry as ISO only, skipping the 8 bytes QuickTime
uses for version/revision/vendor, so a version-1 SoundDescription's
16-byte tail was taken for the first child box and the wave-wrapped esds
behind it never seen -- "trak[2].stbl.esds not found", and with it every
Resolve / Final Cut / `ffmpeg -f mov` file. Vendored mp4 0.14 under
vendor/mp4 (patch table entry, workspace exclude): Mp4aBox::read_box now
reads the version, skips the v1 tail or takes rate/channels from the v2
block, and finds the esds directly or inside `wave`; the crate's ten
lint warnings cleaned with it. New fixture assets/test_qt.mov (ffmpeg -f
mov, same 440/880 tone) and a test in audio_decode that fails on stock
0.14 and passes here.

Verified in the harness on a Resolve export: opens with picture and waveform,
plays (sink RMS -26.9 dBFS), seeks to 00:10 and plays the right audio
(captured peak -11.109 dBFS = source's own). Workspace suite 981/987;
the six failures are five load flakes that pass serially and one
pre-existing failure on clean main (audio_multi layout refusal), logged.

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

✨ feat(engine): the driver that aborts kills a process nobody was editing inAhmet Kaan Gümüş · c0a1847
✨ feat(engine): the driver that aborts kills a process nobody was editing in

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

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

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

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

Decode is still in the editor's process, where the same abort would still be
fatal; the seam to move it is now the one this built.

2026-08-13

⚡ perf(engine): the Opus decoder gets the transform it was written aroundAhmet Kaan Gümüş · edbb3e3
⚡ perf(engine): the Opus decoder gets the transform it was written around

`ruopus` was asked for `std` alone, and its default `spectrograms` feature --
read here as "its own analysis tools" -- is the FFT backend of the CELT
synthesis MDCT. Without it the crate evaluates an O(n²) DFT in f64 per block,
and a 5.1 soundtrack decoded at 0.95x realtime: slower than playing it.

Measured on the project's own fixtures, release:
  test_tone.opus     10.44x -> 135.01x realtime
  test_opus_51.mka    0.95x -> 103.80x
  test_opus_71.mka    0.93x -> 112.04x

Not bit-identical -- FFT summation order differs -- but the two builds agree to
144 dB SNR (max |Δ| 3.7e-8) while both sit 93 dB from ffmpeg's libopus decode of
the same file, so the change is 40 dB below the decoder's existing distance to
the reference.

2026-08-12

🐛 fix(engine): the codec stops replacing the whole program's allocatorAhmet Kaan Gümüş · c8f62cb
🐛 fix(engine): the codec stops replacing the whole program's allocator

`rusty_h264-common` declares `rusty_alloc` as the `#[global_allocator]` of
whatever links it, and its sibling decoder and encoder turn that feature on
from their own defaults -- so no downstream feature choice could decline it.
Sustained scrubbing churns decode-worker threads, and that allocator faulted
on both ends of a thread's life: on a new one's very first allocation, and
in `Heap::collect_inner` from the `thread_done` TSD destructor. Three cores.

`common` is vendored (the fifth, same idiom as the other four): the feature
stays declared so the sibling manifests still resolve, but it is empty and
the six-line declaration is gone. Not one line of codec code differs from
0.9.1 -- 360 decoded pictures across three fixtures still match ffmpeg's
`framemd5` exactly -- and the process gets glibc's malloc back.
🔊 feat(export): an edited Opus source leaves an mkv as OpusAhmet Kaan Gümüş · 76ede8e
🔊 feat(export): an edited Opus source leaves an mkv as Opus

Opus could be read here since `ruopus` landed and could not be written at
all, so every cut of an Opus film came out as AAC in a Matroska file: a
codec downgrade nobody asked for, paid on every edit. `opus-rs 0.1.26` is
the encoder half -- a pure-Rust port of libopus 1.6, BSD-3, no `build.rs`,
not one `.c` in the crate and no dependencies at all (checked, not read off
the README) -- and a Matroska export now writes `A_OPUS` with an `OpusHead`
in its `CodecPrivate`, `CodecDelay` and the codec's fixed 80 ms
`SeekPreRoll` beside it. An mp4 still says AAC and the mp4 writer now
refuses an Opus track by name rather than declaring `mp4a` over it.

Only where an *encode* was going to happen anyway. An untouched timeline
still copies its packets, bit for bit, into the same container: Opus is what
an edit costs, never what a passthrough costs.

The envelope is measured and it is narrow, which is the whole story of this
crate. On three one-second spans of a 5.1 Opus film, encoded here and
decoded with `ruopus` -- not the suspect, it reads ffmpeg's libopus at 256
kbps back at correlation 1.00000 -- the encoder is usable to 128 kbps
(0.937/0.989/0.994) and ruined by 136 (0.452/0.697/0.951), against libopus
at 0.997/0.998 on the same material. Pure-tone fixtures put that cliff at
165 kbps, so its edge moves with the content and no constant is safe on its
own: the cap is 128 kbps *and* every track is decoded again and correlated
with the mix before it is written. Below 0.95 the export writes AAC instead,
and the encoder line the export publishes says AAC, so the fallback is
visible rather than silent. Mono keeps AAC outright -- this encoder mis-codes
it at every rate asked for here -- and so does any timeline that is not
48 kHz, since Opus has one rate and resampling a whole timeline to reach it
is a bigger change to the sound than the codec is.

Two delays, both measured rather than hoped for. The pre-skip is 1080
samples: the encoder's 2.5 ms lookahead plus one warm-up frame, because a
cold first frame comes out ramped and out of phase (the head of the fixture
went 0.9788 -> 0.988 correlated once it was fed its own first 20 ms first),
and one silent frame is pushed in at the end so the last 2.5 ms leave the
encoder instead of ending the track short under a picture that is not.
ffmpeg's decode of the file agrees with this project's own reader sample for
sample, which is what says the header describes the stream.

`tests/opus_export.rs` exports a cut and reads it back through symphonia's
mkv reader and `ruopus` -- 0.9948 left and 0.9825 right against the source,
0.997/0.993 past the first frame -- proves the AAC copy still wins where it
applies and that a mono mix takes the AAC path, and, with `EDITH_OPUS_FILM`
pointing at a real-library Opus mkv, cuts a span out of the film itself:
correlation 0.9914 at a lag of one sample. The unit test in `export.rs` pins
the 256 kbps failure, so the day the crate fixes it this suite fails and the
cap can be raised.
⬆️ deps(h264): the software decoder now agrees with ffmpeg, picture for pictureAhmet Kaan Gümüş · 1d9b2f4
⬆️ deps(h264): the software decoder now agrees with ffmpeg, picture for picture

`rusty_h264` 0.8 was not bit-exact. Across a 1080p High and a 720p Main clip
-- 750 pictures, both with B-frames -- it reproduced ffmpeg's own decode
byte-for-byte on 26 of them and drifted on the other 724, worst case 69.8 dB
PSNR. That is invisible on a monitor and still wrong: it is the picture a
grade is measured on, the picture a still is exported from, and the picture a
software export re-encodes. 0.9.1 matches ffmpeg on all 750, which is the
property the manifest already demands of `ruopus` and `oxideav-ac3` and had
never actually checked here. Pinned exactly for the same reason they are.

It is faster by the same stroke: 247 Mpx/s against 171 decoding the 1080p
clip, 256 against 176 on the 720p one -- 1.44x, single-threaded, min of 20
interleaved rounds on a loaded box (a second binary built from the same 0.9.1
sources came within 1%, which is what the interleaving is for). Software
encode is a wash at 1.04x and 0.97x, so nothing about an export's speed
changes; what changes is what it encodes *from*.

The challenger measured against it, `rust_h264` 0.4.0 (MIT/Apache-2, pure
Rust, decode only), does not take the seat on either axis: 1.00x and 0.88x of
0.8's decode rate, so 0.69x of this crate's, and it is not bit-exact either --
256 of the same 750 pictures, worst 39.2 dB, and the mismatches are pixels
ffmpeg never emitted rather than a reordering. The gate wanted 1.25x and no
correctness regression; it returned neither.

`default-features = false` stays, and keeps the vendored openh264 SIMD kernels
(`asm`, `nasm` at build time) out of a build this project promises needs no
tools. It does not keep out `rusty_alloc`: the facade pulls its sub-crates with
their own defaults and `rusty_h264-common` installs that allocator process-wide
for the whole app. Nothing downstream can switch it off. Measured at 0.104 s
against glibc's 0.142 s on 2M mixed allocations, so it is a gift rather than a
tax -- but it is a gift nobody asked for, and the manifest now says so.
🔊 feat(audio): an Opus film is heard, not refusedAhmet Kaan Gümüş · 699950a
🔊 feat(audio): an Opus film is heard, not refused

The refusal was the bug again. `is_audio` said "no opus, ac3 or dts, for
which no pure-Rust decoder exists" while symphonia's own mkv and ogg readers
have always mapped `A_OPUS` and `OpusHead` to `CODEC_ID_OPUS`: the containers
read the format, only the decoder was missing. Symphonia genuinely has none
at any version -- its feature list stops at vorbis and there is no
`symphonia-codec-opus` crate -- so the decoder is `ruopus`, pure Rust, MIT,
no dependencies of its own, and the film plays.

Which crate is not a coin toss. A 5.1 track is four elementary Opus streams
in one packet, all but the last self-delimited (RFC 6716 App. B).
`rusty-opus 0.9.1` -- the sibling of `rusty_aac`/`rusty_mp3` already here --
hands each self-delimited slice to a decoder that parses it as an ordinary
packet, so every stream but the last reads the length prefix as payload: it
was measured on a 5.1 Opus remux as full-scale noise at -13
dBFS over a passage where the film is silent, which is exactly the failure
that "the decoder returns samples" would have shipped. `ruopus` matches
ffmpeg's decode of the same file to a correlation of 1.00000 on all six
channels.

Two things that are Opus's alone: it is stored in Vorbis channel order
(FL, FC, FR, BL, BR, LFE) and the 5.1 fold reads the film order every other
decoder here hands back, so the frame is permuted before it folds; and its
encoder delay lives in the stream (`OpusHead`'s pre-skip, 312 samples) where
neither reader drops it, so that is this track's priming -- sample-exact
against ffmpeg afterwards, 6.5 ms late before.

`.opus` and `.mka` join `is_audio`, `unsupported` asks the other reader
before naming a codec (a refusal that fires on a track which decodes is the
same defect wearing the other face), and `capability_matrix` covers Opus per
container with DTS left as the one live refusal row.

2026-08-11

🔀 merge(subtitles): a PGS cue is a picture the timeline carriesAhmet Kaan Gümüş · 1bee319
🔀 merge(subtitles): a PGS cue is a picture the timeline carries

Conflicts, both in the demux lane's territory:
- matroska_subtitles wanted-track filter: PGS joins S_TEXT, and both
  still skip a track whose ContentEncoding the demuxer cannot undo.
- mkv_subtitle_blocks: the demux lane's laced walk stands; A's
  single-payload read and its refusal of lacing are dropped. A laced
  block's cues share a start, so end_of's strict > still finds the
  next real block.
- cues_of: A's &mut signature and PGS doc, with the demux lane's
  unsupported early return that is the source of the refusal text.
✨ feat(demux): a header-stripped or laced Matroska track plays instead of refusingAhmet Kaan Gümüş · 5d028c2
✨ feat(demux): a header-stripped or laced Matroska track plays instead of refusing

Two features every disc rip and streaming remux carries and this demuxer had no
reader for:

- `ContentEncodings`: header stripping (`ContentCompAlgo` 3) puts the bytes the
  muxer cut off the front of every frame back, and zlib (algo 0) inflates.
  bzlib, lzo1x, an unknown algorithm and encryption are refused *by name*, and
  per track -- a film whose sound cannot be read still shows its picture, and a
  subtitle track that cannot be read is listed with the reason like a bitmap
  one.
- Lacing: all three headers (Xiph, fixed, EBML) read into one `Block` per
  frame. The frames of a lace get a timestamp each, interpolated across the gap
  to the block after, because six E-AC-3 frames stacked on one instant is a
  sound track that walks away from the picture inside a cluster.

The two films this was cut for: a BluRay remux whose H.264 track is stripped of
one zero byte per block (no picture at all before this), and a WEB remux whose
every E-AC-3 block is fixed-laced (no sound at all before this). Both are
existence-gated tests beside the hand-built EBML fixtures.

zlib is `miniz_oxide`, which `image` already pulls into this build through
`png`: no new crate tree and nothing new to compile.
✨ feat(subtitles): a PGS cue is a picture the timeline carries, not a row that says noAhmet Kaan Gümüş · c45b18e
✨ feat(subtitles): a PGS cue is a picture the timeline carries, not a row that says no

The four S_HDMV/PGS tracks of a BluRay remux were listed and greyed: pictures,
and nothing here could draw one. Now the cue IR carries a picture beside its
text -- `Cue::image`, a `CueImage` holding the display set the Matroska block
held -- and the rows are rows a click can pick.

The decoding is `oxideav-sub-image`: the run-length walk, the palette, the
YCbCr and the object fragmentation are not this project's to re-derive. What is
written here is the framing between the two -- a Matroska block is a `.sup`'s
segments with the `PG` magic and the timestamps taken off, so they go back on --
and the pairing PGS needs and text does not: half the blocks compose nothing,
which is the disc clearing the screen, and that is where the cue before them
ends. `BlockDuration` is zero on every one of them, so `end_of` now reads a zero
the way it reads a missing one.

Kept encoded, decoded when something is about to draw it: this film's canvas is
8 MB of RGBA and its four tracks carry eleven thousand display sets, so the IR
holds the thirty megabytes the file already spends and the front-end keeps one
decoded picture for as long as its cue is up.

An export still writes a text track, so a track of pictures writes none and the
card says "drawn, not written" before the button. A `.edith` is unchanged: it
held a file and a track number and never a cue, which is why a bitmap track
round-trips without the format knowing it exists.
✨ feat(export): OGG Vorbis is a row you can pick, not a note about missing encodersAhmet Kaan Gümüş · 17d7d99
✨ feat(export): OGG Vorbis is a row you can pick, not a note about missing encoders

The export card said "no pure-Rust Vorbis or Opus encoder" and that had stopped
being true. `rusty_vorbis` 0.1.1 (Apache-2.0, zero dependencies, same family as
the h264/aac/mp3 encoders already here) is the first permissively-licensed
pure-Rust Vorbis *encoder*; `oxideav-ogg` 0.1.8 pages it, and its only dependency
is the `oxideav-core` the AC-3 decoder already pulls in. No C, no FFI, no new
runtime system dependency -- `ldd` on the binary is unchanged, name for name.

The row is live, keyed `o`, and names its encoder like every other live row does.
VP9 stays refused with the reason it always had: AV1 replaces it.

What the bench found, and what the code does about it. Every number below was
measured by encoding this suite's own fixtures and decoding them back with
symphonia -- an independent decoder, and the one this engine reopens exports
with:

* The encoder numbers its granules a full block ahead of the samples it codes,
  so written straight through, every sample lands ~1024 early: a marker signal
  came back with its head at 36% amplitude and a full-scale burst 1500 samples
  before the real one, in silence. One hop of silent pre-roll puts it back --
  head 0.86 against an input peak of 0.80, the phantom burst down to 0.04.
* Its block grid overshoots the last sample, so the stream is padded and the
  last page's granule declares the timeline's own frame count. An `.ogg` is now
  exactly as long as the WAV of the same timeline, which is the promise every
  other audio row here keeps.
* Below quality 0.50 the encoder is *quiet*, not merely coarse (1-1.6 dB of
  level error, near-silence at 0.10), and the whole usable band tops out around
  200 kbps. So the file is written at one measured quality, 0.85, and the Sound
  row is refused by name rather than mapping 128/192/256/320 onto quality steps:
  the top two are rates this encoder cannot reach, and a card that printed them
  would be lying.
* The embedded setup header is a stereo profile -- a mono push is refused
  outright -- so a mono mix is written as dual mono, both channels bit-identical.

And one defect the round trip turned up on the way in: `SymTrack` subtracted
`Track::delay` on top of symphonia, which already drops those frames itself.
Every `.mp3` import was losing its first 1105 samples (25 ms) and reading 25 ms
short, every `.ogg` its first 128. Measured against `test_tone.flac` -- lossless,
and the only one of the three declaring no delay -- which the mp3 and the ogg of
the same tone now align with. WAV, FLAC and AAC-in-mp4 read hash-identical
across the change; only those two formats move, and both move to the length
their own container declares.
✨ feat(engine): subtitles come in with the film or beside itAhmet Kaan Gümüş · f4b5fd8
✨ feat(engine): subtitles come in with the film or beside it

A subtitle track was a track this engine walked past: the Matroska track
walk kept video and audio and dropped type 0x11, and a `.srt` next to the
media was a file with no door. Now both arrive as the same thing -- a
list of timed cues -- and a project keeps them.

`subtitle`: the cue model plus the two ways in. Standalone `.srt`,
`.vtt` and `.ass`/`.ssa` go through `oxideav-subtitle` and `oxideav-ass`
rather than through a fresh parser here; an embedded track carries its
timing on the block and its text in it, so each codec is put back into
the shape its own parser reads -- which is what makes an embedded track
and the file it was muxed from come back as the same cues.

What cannot be read is refused by name and still listed: the four PGS
tracks of a BluRay remux are four rows saying they are pictures, not an
empty list and not a file that would not open. A `.srt` that has gone
missing since the save is the same story, and a re-save keeps its row.

`.edith` 10 writes `subtitle <track> <path>` -- the reference only, the
cues stay in the file they came from. v9 and every older dialect load as
the projects with no subtitles that they are.
✨ feat(export): HEVC leaves the way it came in — intra, in either boxAhmet Kaan Gümüş · 12f8cb7
✨ feat(export): HEVC leaves the way it came in — intra, in either box

The one codec edith could read and never write. OxideAV's pure-Rust H.265,
vendored from git master (its released 0.0.9 is pre-encoder) with one marked
patch: the intra SPS writer had no conformance window and refused any dimension
off the 16-sample CTB grid, so 1920x1080 could not be written at all. It is now
coded padded to 1088 with the edge replicated and cropped back by the SPS, which
is what ffprobe reads out of the bitstream.

Intra-only, and every row says so: the inter modes code 1080p at 0.81 fps across
twelve cores and the intra path does 4.30 on the same picture, so the export is
an intraframe master — ProRes-shaped, large files, every frame a cut point —
rather than a delivery file nobody would wait for. The AU is a stateless
function of one frame, so frames fan out across twelve lanes and are collected
back in display order.

Two rows, `h` and `x`, because a codec and a container are two choices: the
`hvcC` record built from the encoder's own VPS/SPS/PPS goes into a Matroska
`CodecPrivate` and into an mp4 `hvc1` sample entry unchanged, so the two files
are one stream written twice. Both re-open in edith through the plugin, sound
and all.
✨ feat(export): every video format carries sound, AV1 picks its box, MP3 is a rowAhmet Kaan Gümüş · 5ebd3ac
✨ feat(export): every video format carries sound, AV1 picks its box, MP3 is a row

Three asks, one seam — the export's audio path was a packet copy, and everything
it could not copy was a refusal.

- MkvMuxer gains an A_AAC track (CodecPrivate = AudioSpecificConfig, CodecDelay
  one packet) and interleaves it into the clusters: an AV1 export carries the
  timeline's sound instead of naming it as left out.
- Mp4Muxer::create_av1 writes AV1 into an mp4 — the `av01` + `av1C` sample entry
  `mp4 0.14` cannot spell is patched into the finished moov (layout cribbed from
  OxideAV's oxideav-mp4, MIT); Mp4Demuxer reads that entry back.
- Format::Mp3 through `rusty_mp3` at 256 kbps CBR, and Format::Av1Mp4 beside
  Format::Av1: the export card has a row and a key for each.
- copy_audio lifts every "cannot copy" refusal into a route to encode_audio —
  a second audio lane, a speeded clip, a Matroska source, an mp3 or a png
  timeline. A copy nothing forces stays a bit-exact copy.

Round trips per container, through this project's own readers: mkv + mp4 AV1
with a tone (mux unit tests), an AV1 export in either box (tests/av1.rs), a
still under a song as an mp4 with sound and an MP3 of the timeline
(tests/audio_export.rs), two lanes summed into an mp4 (tests/lanes.rs), a
speeded lane resampled into one (tests/speed.rs).

2026-08-10

✨ feat(import): a Matroska film opens, its 10-bit picture and its 5.1 sound alikeAhmet Kaan Gümüş · b083a3b
✨ feat(import): a Matroska film opens, its 10-bit picture and its 5.1 sound alike

mkv HEVC demux (Main/Main10), a P010 pool in the hardware path read back to
I420, mkv audio through symphonia's Matroska reader with rusty_aac decoding
what symphonia's own AAC refuses (anything wider than stereo), and a BS.775
fold of 5.1 down to the stereo the output device takes.

vendor/rusty_aac is 0.5.0 with one local patch: its decoder's IMDCT caches the
cosine matrix instead of calling cos() per term, 11x faster and the difference
between playable and not.
Merge branch 'main' into worktree-agent-ae7a2aef268502a46Ahmet Kaan Gümüş · 934361c
Merge branch 'main' into worktree-agent-ae7a2aef268502a46

# Conflicts:
#	crates/engine/Cargo.toml
✨ feat(timeline): still images import and place as clipsAhmet Kaan Gümüş · 30d430d
✨ feat(timeline): still images import and place as clips

A PNG, JPEG or WebP is a source like any other: it imports into the
library, drags onto a video lane, shows at the playhead, trims, saves and
exports. `engine::is_image` is the door, beside `is_audio`, and every
choice it forces is made in one place.

The decisions, spelled out:

- Extensions: png, jpg, jpeg, webp -- exactly what the `image` crate is
  built with here. Anything else is refused by the door that refuses a
  .txt.
- Length: an image has none, so it is *held to* ten minutes (600 s at the
  timeline's rate) and *placed* at five seconds. The cap is finite on
  purpose -- a u32::MAX sentinel would hand a trim drag a wall past
  anything the timeline can hold -- and it is recomputed identically at
  load, so a clip trimmed out to it reopens.
- Image-first project: its own picture is the canvas (a still *has* a
  resolution, unlike a song) at 30 fps, silent, one 5 s clip on V1. The
  A2 audio-only precedent for everything else.
- Scaling: none of its own. The still is decoded once to I420 and goes
  through the same grade, the same `Composer` and the same conversion a
  decoded picture does, so a 640x360 image on a 1280x720 canvas is
  letterboxed by its fit policy and never stretched.
- Lanes: the mirror of a song. A still goes on the video lane it was
  asked for or on V1, never on an audio one, and never as a grouped take
  -- a clip on A1 playing a PNG is a segment the audio worker cannot
  open. Hand-written projects are refused by name.
- The timeline's audio parameters are now the first source that *could*
  have any, so an image as source 0 no longer holds every later import to
  its silence.

Playback opens a still worker (one conversion, then a memcpy per frame,
as the black-gap worker does); the export's `ClipDecoder` hands the same
planes out for as long as the span runs, so a mixed video/still timeline
encodes at the cut.

tests: engine/tests/images.rs -- import registers only, placed pixels
match the file's own (top/bottom bands catch a flip, RGB order catches a
swap), trim walls at the cap, .edith round trip incl. the audio-lane
refusal, mp4 export pixel-checked at the cut, audio-lane placement lands
on V1. Fixture: scripts/gen_fixtures.sh writes assets/test_still.png.
✨ feat(export): AV1 comes back out, in a Matroska file this editor reopensAhmet Kaan Gümüş · dd3a2a8
✨ feat(export): AV1 comes back out, in a Matroska file this editor reopens

The export card's second picture format. AV1 already *arrives* here as
Matroska (`mp4 0.14` has no `av01` sample entry at all, so `demux` walks
the EBML by hand); it now leaves the same way, through an `MkvMuxer`
written beside the mp4 one -- EBML header, `Info`, one `V_AV1` track whose
`CodecPrivate` is a real `av1C` record built from the first keyframe's
sequence header OBU, then clusters that open on every keyframe. The
segment size and the duration are the only two fields patched at `finish`.
Matroska rather than AV1-in-mp4 because the reader for it already exists:
the round trip closes against this project's own `Demuxer`.

Picture only, and said so on the row before a destination is picked ("AV1
picture in .mkv — no sound: export WAV or FLAC for that"). Matroska
carries no sound this project can *write* -- no AAC or Opus encoder here
-- and an AAC track copied in would be one this engine's own reader leaves
silent (`AudioSession::open` refuses Matroska audio). A silent track
written anyway is the one failure a user would not notice.

The encoder pair mirrors H.264's: `rav1e` in software, the plugin's new
`vh_enc_av1_open` on the GPU. The hardware seat is wired, tested and
**opt-in** (`VE_HW_AV1=1`): the vendored cros-codecs AV1 encoder took the
radeonsi box this was written on into an amdgpu hard recovery, and a
driver reset is not an export. `rav1e` is not a new dependency at all --
`ravif` already locks the same 0.8.1 -- and is built with `asm` off (no
`nasm` in this build) and `threading` on: 39 s for the 5 s 720p fixture,
progress reported the whole way.

HEVC and VP9 are rows too, refused by name: no encoder in this stack and
patent-encumbered, and superseded by the AV1 row above.
✨ feat(engine): common audio files import and playAhmet Kaan Gümüş · fe53979
✨ feat(engine): common audio files import and play

mp3, wav, flac, ogg-vorbis, ALAC and ADTS join a timeline as sources with
no picture: symphonia's own probe reads them, the audio lane holds them,
and the video lane refuses them by name. The mp4/AAC path is untouched --
it is still the only one that yields packets an export can copy, so a
timeline carrying anything else is refused at export with the file and its
format named rather than exported silent.

A source with no picture is as long as it plays, rounded up to whole
frames; import, load and the library row all derive its length from that.

2026-08-09

✨ feat(engine): audio decode, PipeWire output plugin, playback clockAhmet Kaan Gümüş · 229a569
✨ feat(engine): audio decode, PipeWire output plugin, playback clock

Wave 1 of the audio slice — three independent modules, app wiring
comes next:

- audio.rs: AAC-LC via standalone symphonia AacDecoder over the
  existing mp4 demuxer; priming trim read from the container elst
  (verified against ffprobe); channel identity pinned by
  zero-crossing tests on the 440/880 Hz fixture
- engine-audio: dlopen'd PipeWire cdylib (ao_* C ABI). App binary
  keeps zero libpipewire linkage; daemon absent fails open() in ~1ms.
  Fill capped at 1024 frames/callback: uncapped, PipeWire hands the
  sink-sized buffer and the position clock steps 256ms at a time.
  Stream time rate is 1/48000 regardless of stream rate — position
  is rescaled or the clock runs 8.8% fast on 44.1k content
- clock.rs: PlaybackClock, audio-driven with wall fallback; audio
  positions relative to last re-anchor so restarted streams re-sync;
  paused == frozen exactly, all re-anchoring through one path
🎉 feat: MVP decode pipeline — mp4 → H.264 → gpui previewAhmet Kaan Gümüş · 0acbf8d
🎉 feat: MVP decode pipeline — mp4 → H.264 → gpui preview

- engine: mp4 demux → Annex-B, rusty_h264 software decode, BT.601
  I420→BGRA; decode on worker thread behind a bounded channel
- engine-hw: optional VA-API decode plugin (cros-codecs) behind a
  C ABI, dlopen'd at runtime with silent software fallback; the app
  binary keeps zero libva/gbm/drm linkage so it runs on any distro
- app: gpui window, per-frame RenderImage swap + drop_image
- vendor/: cros-libva + cros-codecs with 3 LOCAL PATCH fixes (libva
  1.23 struct init, radeonsi 64x64 min context, pub surface()) —
  upstream is dormant, so vendor/ is adopted code, not a temp fork
- fixtures are gitignored; scripts/gen_fixtures.sh regenerates them