Commits
Commits on
65ea910e6ecfb00fe9bdf4485eb55ea276768a622026-08-12
🐛 fix(decode): a 4K wavefront HEVC is 33 entry points, not 32Ahmet Kaan Gümüş · 65ea910
🐛 fix(decode): a 4K wavefront HEVC is 33 entry points, not 32 A 4K wavefront HEVC film (3840x2160, CTB 64, entropy_coding_sync) writes num_entry_point_offsets = 33 in every slice header -- exactly PicHeightInCtbsY - 1, which is what ITU-T H.265 §7.4.7.1 allows -- and the vendored parser kept them in a [u32; 32]. The 33rd panicked, the plugin edge caught it, and the user got a black picture and an instant eof. The list is now sized by the stream. Same shape swept through the rest of the h265 parser, where a parsed count could outrun a fixed array: tile columns/rows (the CTB grid allows far more than the 19/21 the VA-API picture parameter holds), the long-term ref pic block, and sps/vps_max_sub_layers_minus1, which u(3) can read as 7 into 7-long arrays. Those refuse by name instead. And the door now asks the plugin for one picture before it lets a file in: a session that opens and then decodes nothing was the black screen with no explanation, so it is refused in its own words rather than in the missing-plugin ones.
2026-08-11
⚡ perf(launch): the window is up before the film is read, and says which filmAhmet Kaan Gümüş · 544d97b
⚡ perf(launch): the window is up before the film is read, and says which film `edith <25 GB film>` on a cold cache showed nothing at all for twelve seconds: the window was only created after argv[1] had been opened, and a window that does not exist cannot say what it is waiting for. argv is now sorted, not read: every file it names -- the first one included -- goes into the queue a drop uses, and the window comes up empty in 47 ms with the file's name in the title and an OPENING line under the panel naming the read that is running. The first file is the one queued file that is not an import, so its worker *opens* it outright and hands the session over whole (`open_ahead` -> `Landed::Media`/`Project` -> `install_media`/ `install_project`), which is also what keeps a warm launch paying for one header walk instead of two. Everything derived from the file -- canvas, fps, title, export and save paths, subtitle tracks -- is set where it always was, one repaint later; a refused file now says OPEN FAILED in the notice bar instead of exiting before the window. Measured (harness, timestamped sway-IPC + app log): cold 29.6 GB remux, exec -> window 12.95 s / 18.73 s -> 0.047 s, exec -> timeline unchanged (12.9 s -> 12.8 s); warm 2.9 GB film, window 0.73 s -> 0.048 s, timeline 0.68 s -> 0.71 s. The window resizes and repaints throughout the read.
⚡ perf(subtitle): a project naming many tracks of one file walks it onceAhmet Kaan Gümüş · 95fb78d
⚡ perf(subtitle): a project naming many tracks of one file walks it once A saved subtitle row was read by walking its whole Matroska file and keeping one track of it, so a film whose project names thirty-five of them was thirty-five walks of a 25 GB file -- 7.5 s with the window stopped, since a project opens on the UI thread. open_all reads every saved row at once: one walk per distinct file, every row picked out of it, and the rows handed back in the order they were saved in -- a subtitle is picked by its place in that list, so a reordering would silently repoint what the user had picked. open now delegates to it, which keeps the refusal wording in one place.
🩹 fix(test): the subtitle round-trip reads the version the writer writesAhmet Kaan Gümüş · c109992
🩹 fix(test): the subtitle round-trip reads the version the writer writes The tone-map preset bumped .edith to v11; this assertion still named v10 and went red on main.
Merge branch 'worktree-agent-ad755bbe2a8af9c0c'Ahmet Kaan Gümüş · 610e3b6
Merge branch 'worktree-agent-ad755bbe2a8af9c0c' # Conflicts: # crates/app/src/main.rs
⚡ perf(silence): the card is up on the next frame and reads the film behind itAhmet Kaan Gümüş · a2e4154
⚡ perf(silence): the card is up on the next frame and reads the film behind it Pressing Silence decoded the whole audio track on the render thread -- 51 s of dead window on a 25 GB film, with the card marked open and nothing drawn. The decode is a worker now: the card paints at once and says where the read has got to, out of what the header claims the track is, with the import line's two clocks and its stall wording when the mark stops moving. Closing the card, or opening it on another source, cancels the read at its next chunk; a cancelled scan is never cached, since half a track is not an answer. The levels cache is keyed per source and stream instead of holding the last one only, so two films on a timeline stop paying each other's decode -- A, B, A again is one decode of A. What a scan finds is unchanged: 1393 silences at the shipped defaults on the same film, and the nudges after it lands are the arithmetic they always were.
Merge remote-tracking branch 'origin/main' into worktree-agent-abbe2993ca29e3482Ahmet Kaan Gümüş · 1609d29Browse files
⚡ perf(playback): a seek costs the UI thread a thread spawn, not a demuxAhmet Kaan Gümüş · 74a068e
⚡ perf(playback): a seek costs the UI thread a thread spawn, not a demux Playback opened every span's file on the caller's thread: 300 ms warm on a 25 GB film (measured), seconds off a cold cache, and a scrub paid it per seek. `DecodeSession::open_worker_deferred` moves the demux onto the worker -- there is no metadata to hand back on that path anyway, `start_span` discarded it -- so the caller pays a `thread::spawn` and the picture arrives when it arrives, which is what `try_frame`'s `None` has always meant. The four callers that need the refusal at the door (the public `open`, a session open, a project load, an import) keep the sync opener, so a file this machine cannot decode is still named to the user where it is chosen. A file that fails to open *at a span* drops its sender, and the disconnected receiver walks the session on to the next span exactly as the dead receiver installed here did. Both openers now share one worker body (`decode_span`), so hardware fallback, the codec refusal, the tone map's declared peak and the range clamp cannot drift apart between them. Measured on the film: seek returns in 52-68 us (was ~300 ms), first frame 380-620 ms later. The remaining wait is the container walk on the worker; a per-source parsed-index cache is the follow-up, not this diff.
⚡ perf(color): a slider drag pays for the frames it shows, not for every step it crossesAhmet Kaan Gümüş · e4b04bf
⚡ perf(color): a slider drag pays for the frames it shows, not for every step it crosses Colour and speed drags wrote a live grade per snapped step, and each write reopens the decoder: on a big film that is 550-750 ms a step, so a bar-wide sweep froze the window for the sum of forty of them. Samples crossed while the worker still owes a frame are now held instead of written, and the frame that lands writes the last one -- the gate is delivered work, never a timer. The press still takes the undo step and the release still lands exactly where the hand let go. A seek that stands past two seconds says so in the import bar's words rather than looking like a hang.
🐛 fix(project): the undo stack stops at 100 steps and an export clones the timeline, not the sessionAhmet Kaan Gümüş · 2504de7
🐛 fix(project): the undo stack stops at 100 steps and an export clones the timeline, not the session snapshot() drops the oldest step at the cap: one gesture is one step, so 100 is past any chain walked back by hand, and a 1394-clip jumpcut timeline's history is a bounded ~10 MB instead of one that grows for as long as the session lasts. export_to_with hands export::start a Project::export_snapshot() -- lanes and sources with the history left behind. The clone is taken on the UI thread and an export never walks the history back; the written bytes are unchanged.
✨ feat(import): a 25 GB film reads on a worker, and the window says so while it doesAhmet Kaan Gümüş · a2d201d
✨ feat(import): a 25 GB film reads on a worker, and the window says so while it does The freeze was one call: `Demuxer::open` on a cold 29 GB remux is 11 s (measured), and it ran on the UI thread at every import door. Nothing else came close -- the subtitle walk is 200 ms, and the two reads that really are slow (probe_streams 3 s, waveform 55 s) were already off the render thread. So a queued worker reads what the import is about to read and throws it away: the second read costs 150 ms because the pages are warm. The timeline keeps playing through the eleven seconds, and a line above the panel names the file, the stage and an elapsed clock -- and, past five seconds in one stage, says outright that the wait is the file's and not the window's. No percentage anywhere: neither read reports where in the file it has come to, and a bar that invented one would be the lie the freeze already tells. The rest of argv goes through the same door now. Three films on the command line used to be half a minute of no window at all, and a window that has not opened cannot say why.
🐛 fix(zoom): the far stop is the timeline's own length, so a five hour edit has an endAhmet Kaan Gümüş · 69ff17e
🐛 fix(zoom): the far stop is the timeline's own length, so a five hour edit has an end Two 2:30:00 clips are five hours of timeline and the stop was four, so the end of the second one could not be brought on screen by any zoom. The far stop is the whole timeline on the bed plus a sliver now, and short of a pixel to the second (PPS_MIN) the length is not worth widening to -- so a short import still zooms out and the resting scale is still nobody's content. The zoom pill counts hours once there are hours to count.
✨ feat(tonemap): the reference rendition converts a film at the peak the film declaresAhmet Kaan Gümüş · 27097e2
✨ feat(tonemap): the reference rendition converts a film at the peak the film declares `Demuxer::light().peak()` -- a stream's MaxCLL, or its mastering display's maximum -- has been read at every open and dropped on the floor. It now reaches `ToneMapper::new` as `declared_peak`, and `Preset::master_nits_for` is the whole composition rule: `Reference` takes the film's number (1000 stays the fallback for a file that declared nothing), `Standard` and `Vivid` keep their fixed 400 and 250, because a picked exposure that moved per file would not be a pick. One HDR film declares 1759 cd/m^2, so its 1000-nit highlights land at SDR 215 instead of clipping at white, and BT.2408 diffuse white at 145 instead of 166. Both sites that build a table have the demuxer in hand already, so nothing is promoted through `VideoMeta`: the decode funnel reads it before the worker takes the demuxer, and `source_rate` returns it off the header parse export already did -- which is what keeps preview and export on one number. A declared peak is a stranger's number and is checked before it becomes a divisor: outside 100..=10000, or a NaN, is treated as not declared. test_hdr_bright.mkv joins the fixtures for it -- the older HDR metadata ones all say 1000, which no picture can tell apart from the fallback.
✨ feat(demux): a film's real peak brightness is parsed, not assumedAhmet Kaan Gümüş · 5726307
✨ feat(demux): a film's real peak brightness is parsed, not assumed MaxCLL/MaxFALL and the mastering display's luminances, off all three places they live: a Matroska Colour element (0x55BC/0x55BD and the MasteringMetadata floats behind 0x55D0), an mp4 sample entry's clli and mdcv boxes, and -- for the web rips where the container carries none of it -- the HEVC SEI messages of the same names in the first access unit. Carried on Demuxer::light() as ContentLight, whose peak() prefers the measured content light over the display the grade was approved on. Nothing reads it yet: wiring it into the tone map, which today assumes a constant, is its own change.
✨ feat(tonemap): the HDR rendition is a row you pick, not a constant someone chose for youAhmet Kaan Gümüş · 09671f7
✨ feat(tonemap): the HDR rendition is a row you pick, not a constant someone chose for you BT.2446 Method A's assumed mastering peak was a constant in the module: 400 cd/m^2, one exposure decided for everybody. It is a matter of taste, not of correctness -- a reference rendition and a vivid one are both honest pictures of the same film -- so it becomes a project setting with three renditions through the very same curve, which is what keeps the hues right whichever is picked: Reference 1000 nits, chroma 1.0 the published conversion (diffuse white 166) Standard 400 nits, chroma 1.0 display-referred, as bright as a player Vivid 250 nits, chroma 1.10 brightest, and a tenth more colour The chroma gain is a scale about 128 in the SDR codes, after the map and clamped to the legal range: a grey stays exactly grey at any gain, and at 1.0 it is a clamp the maths cannot reach, so the other two presets are byte for byte what Method A produced. HLG's OOTF gain is guarded at black -- below a 1000 cd/m^2 peak the system gamma is under 1, and the 0 * inf that follows byte-cast to 0 and put a hole where black belongs. The preset lives on the Project beside the limiter (a setting, not an undo step), reaches the decode workers and the export through the same value, and is saved as a `tonemap` line in edith 11 -- left out when it is the default, so a project holding no HDR media is the bytes it was, and a v10 file loads as the reference rendition, which is the only one it ever had. Picking one rebuilds the picture under the playhead the way a resize does; an SDR project is unmoved. The panel names it beside the resolution and the rate -- the third thing that is the project's rather than the media's -- and a click opens the three renditions with the one in force marked. No stroke: this is a list to look at.
Merge branch 'worktree-agent-a292c399d416157b0'Ahmet Kaan Gümüş · 7744ff1
Merge branch 'worktree-agent-a292c399d416157b0' # Conflicts: # crates/engine/src/export.rs
✨ feat(color): an HDR film reaches the window tone-mapped, and an SDR one is untouchedAhmet Kaan Gümüş · f8dea1c
✨ feat(color): an HDR film reaches the window tone-mapped, and an SDR one is untouched The tone map existed and nothing called it: a PQ or HLG stream was converted with its own matrix and then shown as if its curve were SDR -- flat, grey-washed, half the brightness a player gives it. `Render` now builds one `ToneMapper` per stream (the transfer is a property of the file, and the LUT is float work over 9 537 nodes) and maps the source planes into BT.709 SDR before anything else looks at them, in both branches of the funnel: the fused passthrough conversion and the graded-then-placed one. The grade lands *after* the map, on the one scratch copy the placed path already made -- a look means what it says in the SDR a viewer is shown, not in the ten stops the file was in. An SDR stream takes neither the copy nor the map and is byte for byte the picture it was, asserted against hashes measured before this change (`tonemap_render`). `MASTER_NITS` is 400, not the 1000 an HDR10 grade is mastered to. Told 1000, BT.2446 Method A puts 203-nit diffuse white on code 166, which reads as broadcast-dark; told 400 it lands on 205, which is the brightness mpv shows. The anchor tests carry the recomputed codes rather than wider tolerances, and HLG's OOTF now follows the assumed peak through BT.2100's own log term -- its relative diffuse white is 19% of whatever peak the display has, so it comes out at 170 and no longer agrees with PQ's absolute 203, which is the standard's behaviour and is written down beside the assert. Measured on the real 4K HDR10 film (`hw_decode`, existence-gated): frame 3000 saturation 34.8 -> 98.9, mean luma 107.6 -> 122.2, and 32.5 ms/frame for the map plus the conversion at 3840x1600, inside the 39 ms budget. New fixture `test_pq.mp4`: four flat patches whose codes are written into the planes by hand, so a test names the code it feeds and the code it expects back.
✨ feat(export): an HDR source is tone-mapped into the file's SDR, once, before the gradeAhmet Kaan Gümüş · f390c37
✨ feat(export): an HDR source is tone-mapped into the file's SDR, once, before the grade The export path read a PQ or HLG source's tags, wrote an SDR file and left the pixels on their HDR curve: a washed-out, flat picture in a file that says BT.709. `engine::tonemap` existed and nothing called it. One `ToneMapper` per source stream -- the 9 537-node table is built beside the per-source rate and colour, not per span -- and one call per frame, into the grade scratch the path already owns, ahead of `apply_yuv`. That order is playback's: the grade is a decision made against the SDR picture on the canvas, so applying it to HDR codes would export a picture nobody saw. The matrix remap that used to be the whole of the answer now asks `remap_into`, which knows the tone map hands back BT.709 whatever the source was coded as: an HDR clip is never *also* given the 2020 matrix treatment, and one on a canvas below 720 lines still takes its 709 -> 601 step. An SDR project is byte-identical: no table is built, no branch is taken.
🐛 fix(color): the bitstream says which matrix it is, and a grade happens where the preview grades itAhmet Kaan Gümüş · 86c11d8
🐛 fix(color): the bitstream says which matrix it is, and a grade happens where the preview grades it Two faults the container-level tests could not see. An HEVC export carried its colour in the file's tags and nowhere in the stream, and a decoder reads the stream first: libavcodec inferred "unspecified", which is BT.601, and rendered a 709 export from the wrong matrix (9.78 mean codes off the right render against 2.27 off the wrong one). The vendored encoder now writes a §E.2.1 VUI carrying the colour description, from the same `ColorDescription::output` rule the muxers tag with, so the two halves of a file cannot drift apart. rav1e gets the same signalling for the same reason; `rusty_h264` has no VUI knob at all (`vui_parameters_present_flag` is hardcoded 0), and H.264 only ever ships here inside an mp4 whose `colr` box rescues it. ...and an export remapped a clip into the file's space before grading it, while playback grades in the source's own space and converts for the screen -- so a graded 601 clip on a 709 canvas came out 21.04 mean codes away from the picture the canvas had shown. The grade goes first now, which is the order `Decoded::frame` renders in. Measured, on the frame-0 rig: preview vs export 21.04 -> 0.15, and `ffprobe -show_frames` on the raw HEVC and AV1 elementary streams reads bt709 where it read unknown. An ungraded same-space export is byte-identical to before.
✨ feat(export): a file says which matrix its numbers are in, and its clips are all in that oneAhmet Kaan Gümüş · 907dfc5
✨ feat(export): a file says which matrix its numbers are in, and its clips are all in that one Exports carried no colour tags at all: the numbers went out as they came off the decoder and every reader downstream had to guess. A 601 clip beside a 709 one went out as two spaces in one file, and nothing said so. Now every export declares a space -- BT.709 at 720 lines and up, BT.601 below, the same rule a reader with no tags applies -- in the Matroska `Colour` element and the mp4 `colr` box, and a clip coded against the other matrix is rewritten into it before it is graded. Same-space clips take the path they always did and not a byte is touched.
✨ feat(colorspace): a picture is converted in the matrix its own file names, not in BT.601Ahmet Kaan Gümüş · 55b1c8d
✨ feat(colorspace): a picture is converted in the matrix its own file names, not in BT.601 Every displayed frame went through one hardcoded integer matrix -- BT.601 limited, 298/409/-100/-208/516 -- whatever the stream said it was. An HD or UHD file read that way shifts: BT.709's red weight is 0.2126 against 0.601's 0.299, which is a visible cast on faces and saturated colour. The two converters now take the `ColorDescription` the demuxers already resolved, and derive their 8.8 coefficients from that matrix's two luma weights and its range once per frame, so the pixel loop is the same multiply-and-shift it was. BT.601 limited rounds to exactly the integers that were hardcoded, so SD material is byte for byte the picture it always was. Stills keep BT.601 on purpose: `rgb_to_i420` writes them in it, and the pair round-trips. Transfer curves are untouched -- a PQ or HLG stream gets the BT.2020 matrix and is still shown as SDR, with the seam marked.
✨ feat(tonemap): PQ and HLG become BT.709 through a published curve, not a guessAhmet Kaan Gümüş · 0a02d34
✨ feat(tonemap): PQ and HLG become BT.709 through a published curve, not a guess BT.2446 Method A, whole: the tone curve, the colour-difference scaling with its luma payback, and BT.2020 -> BT.709 with a simple clip. Written down, so it can be checked against the document instead of against a screenshot. The maths is float and transcendental, so it runs 9537 times per stream -- a 33 x 17 x 17 grid over the input codes -- and the pixel loop is a trilinear interpolation with the two luma neighbours packed into one word. 18.7 ms a 3840x1600 frame, 6.3 ms at 1080p, single core, release. Uneven axes on purpose: 17 luma nodes leave the assumed 1000 cd/m^2 peak five codes shy of SDR white, and a full 33^3 costs 30.7 ms. Above-peak light is clamped before the curve rather than extrapolated through it -- extrapolating sent one channel over the gamut rail and the next under it, a hundred-code hole in a smooth ramp. Standalone: no decoder or export path calls it yet.
✨ feat(colorspace): a file says which matrix and curve its numbers are in, and edith reads itAhmet Kaan Gümüş · 070ffe6
✨ feat(colorspace): a file says which matrix and curve its numbers are in, and edith reads it Three tiers, per field: the container's own tags (Matroska `Colour`, mp4 `colr`), then the bitstream's (H.264/HEVC SPS VUI, AV1 `color_config`), then the ffmpeg/mpv resolution rule -- 720 lines or taller is BT.709, below it BT.601, limited either way. A code that says nothing, or says something with no implementation here, falls to the next tier rather than answering wrongly. `VideoMeta` carries the answer; nothing consumes it yet. Everything still renders through the hardcoded BT.601 it always did, which is the bug this is the foundation for fixing. The bit-level walks are where this can quietly go wrong: an SPS whose scaling lists are counted wrongly lands the VUI read in the middle of a coefficient. Both are measured -- H.264 and HEVC against hand-built parameter sets (no encoder here writes SPS scaling lists), the rest against fixtures tagged in the container, tagged only in the bitstream, and tagged nowhere, plus the two real films: a 4K HDR remux that reads BT.2020/PQ and a fully untagged 720p one that reads BT.709.
🧹 test(scratch): a fixture directory is deleted by the test that made itAhmet Kaan Gümüş · 5c39124
🧹 test(scratch): a fixture directory is deleted by the test that made it Every suite here made its own directory under /tmp with a name and a process id and then walked away from it: 2907 `ve_*` directories, 6.4G of a 16G tmpfs, none of them reclaimable by anything but a person with `rm`. `engine::scratch::Scratch` is the one place a throwaway path comes from now -- a directory, or the single file inside one -- and `Drop` is what takes it back. That is the whole reason it is a guard rather than a cleanup call at the end of a test: unwinding runs `Drop`, so the *failing* tests, which are exactly the ones that used to leave the most behind, clean up like the passing ones. It derefs to a `Path`, so the call sites did not have to change: the helpers that handed back a `PathBuf` hand back one of these. The prefixes stay what they were, so a directory is still recognisable while a test is stopped in it. Nothing about what a test *does* moved -- only where its fixtures live and when they die. Driven: the whole engine suite and the app's own tests run with the count of `/tmp/ve_*` before equal to the count after.
✨ feat(subtitles): a subtitle row says which film it came out of, and the film is named over its tracksAhmet Kaan Gümüş · ad9f1ba
✨ feat(subtitles): a subtitle row says which film it came out of, and the film is named over its tracks The list was flat and anonymous: eight rows off three files, every one of them "eng" or "und", with the only answer to "whose is this?" hidden in a tooltip. Now a row names its own file in front of the label -- but only where there is more than one file to tell apart, the way an audio row takes "[audio 2]" only where the file gave several -- and wears that file's tint down its left edge, the same colour its clips wear on the lanes and its rows wear in the media list above. The name is cut out of its middle rather than its end. Two episodes off one release are the same words up to the last two characters, and a name truncated from the right is the same row printed twice; `clip_middle` keeps both ends and spends the width it is given, so a wider window spells more of the file out and nothing is capped at a character count somebody guessed. The media list's own names go through it too -- that list had the same collision and nobody had noticed. Where the window is tall enough for it, each file's block is headed by its name and its tint: a label, no click, nothing to fold, so the tracks under it stay the only things to aim at. At the 640x360 floor the list is one row tall, and a header there would name a film and then show none of it -- so `sub_headers_fit` turns them off and the rows go on saying whose they are by themselves. Nothing about the pick moved: a click still sets the flat index into the add-order list, which is what the .edith holds.
Merge branch 'worktree-agent-a62f844d48ad5e2ef' into worktree-agent-a81b5077f25858904Ahmet Kaan Gümüş · d5d7fdfBrowse files
🩹 fix(audio): an mkv's stream 0 is the track it already played, not its firstAhmet Kaan Gümüş · a7dd4c5
🩹 fix(audio): an mkv's stream 0 is the track it already played, not its first A remux flags the language it wants heard with FlagDefault on whichever track it likes -- mkvmerge writes it on the second one all the time -- and every reader here picked with that flag. Numbering the streams by file position outright made stream 0 a different track on those files, so an .edith project saved before the listing existed would quietly start playing the other language. mkv_stream_order puts the track the file already plays first and the rest behind it in file order, and it does not re-derive the old pick, it runs it: the AC-3 arm asks MkvAc3Track the same question Track::open asked it, everything else asks symphonia for its default track. probe_streams, Track::open and therefore the library's rows all count in that one order. Tested on a byte-patched fixture -- ffmpeg writes FlagDefault only to say 0, so the one byte behind the French track's language is flipped to 1 -- and it fails on file-order numbering: eng leads instead of fra.
Merge remote-tracking branch 'origin/main' into worktree-agent-a5df3068013f45edaAhmet Kaan Gümüş · cd8f9faBrowse files
✨ feat(subtitles): the picked track says which film it came out of, wherever it is namedAhmet Kaan Gümüş · a29af89
✨ feat(subtitles): the picked track says which film it came out of, wherever it is named The strip header, the section heading and the toggle's own notice all echoed `track.label` raw: two remuxes' "eng" tracks read alike, and a track whose only tag is "und" named a language nobody speaks. All three now go through one composer over the S1 grouping, so the name a header says and the row a person clicked cannot disagree -- and the strip header wears the file's own colour, the one its library row and its clips already wear. A standalone `.srt` is nobody's stream: no colour, and no stem after a label that is already the file's name. The colour was asked for by a path spelled as it was typed and answered by sources stored symlink-resolved, so `edith assets/film.mkv` painted no colour at all. `file_tint` now falls back to the resolved spelling on a miss, which is also the right answer for a file dragged in by a symlink.
✨ feat(audio): every audio track of an mkv is a row, and the second one playsAhmet Kaan Gümüş · 264c10c
✨ feat(audio): every audio track of an mkv is a row, and the second one plays A Matroska file was worth exactly one audio stream here -- whichever track the readers stumbled on first -- so the second language of a dual-audio remux was invisible and unopenable, and no mkv ever showed what language its sound was in. The header walk now collects every audio TrackEntry in file order with its number, codec id, TrackLanguage and TrackName (demux::matroska_audio_tracks), and that list is what a stream index counts in. The index picks an entry, the entry's *track number* is what each reader is then pointed at -- MkvAudio::open_track for the AC-3 blocks, SymTrack::open_track for symphonia, whose mkv reader keeps the same number as its track id -- so the two readers cannot disagree about which track a stream meant. Stream 0 is still the file's first audio track, sample for sample. Rows name their codec from the container rather than from symphonia's registry: the tracks that most need naming are exactly the ones it has no decoder for, and "opus is not supported" beats "an unsupported format". Fixture: test_multiaudio.mkv, two AAC tracks, eng 440/880 Hz and fra 220/330 Hz -- different tones because a mapping that drifts plays the other language.
✨ feat(subtitles): every track says which film it came out of, and the first import gets a colourAhmet Kaan Gümüş · 388bbf4
✨ feat(subtitles): every track says which film it came out of, and the first import gets a colour SOURCE_TINTS[0] was SURFACE itself, so the first file imported -- the one every session has -- wore the panel's background and had no visible swatch. It is a colour like the other three now, and a test asks for a summed channel distance rather than assert_ne. file_tint's unwrap_or(0) painted any path with no source entry in the first file's colour: a standalone .srt wearing a film it never touched. It answers Option now and the one caller that can miss falls back to the lane's own. subtitle_rows groups the flat add-order list by file, in first-appearance order, numbering each file's tracks the way row_name numbers audio streams. The flat index a click sets and a save writes travels with the row and is never reordered. Nothing draws it yet. lang_human: "und" is what a muxer writes when nobody said, so a row says "unknown language" instead of naming a language nobody speaks.
✨ feat(export): 2K QHD joins the resolution ladderAhmet Kaan Gümüş · 0a39fae
✨ feat(export): 2K QHD joins the resolution ladder 2560x1440 sits between 4K and 1080p in RESOLUTIONS; the ladder, picker rows and stroke-cycle all read the same list, so one rung is the whole change.
🩹 fix(subtitles): the grafts off the losing PGS laneAhmet Kaan Gümüş · bf65371
🩹 fix(subtitles): the grafts off the losing PGS lane - The overlay is a flex box with the canvas as its one growing item, fitted (Contain) the way the picture under it is: size_full inside an absolutely placed box has nothing to be a percentage of, and Fill put every cue somewhere the disc did not. - One way out of subtitle_overlay, and it lets the drawn picture go on the way: the toggle going off leaked an 8 MB atlas tile per press. - A track is pictures because of its codec id, not because its first cue happens to be one: an all-erase or empty PGS track passed for text and an export promised words it has none of. - The sup handed to the decoder stops at the end of the first display set that composes something, so a muxer packing the erase into the same block no longer blanks the cue. - The film-gated session test: the row a click picks, the map a repaint asks for twice (under 16 ms warm), the picture it draws.
🔀 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.
🐛 fix(timeline): a dropped row lands where the hand let it go, not after the last clipAhmet Kaan Gümüş · 0d1c2c1
🐛 fix(timeline): a dropped row lands where the hand let it go, not after the last clip
A library row dragged onto the open bed past the last clip was appended to
the end of the timeline wherever it was released: the ghost promised one
frame and the release committed another.
`Project::paste` clamped the frame it was asked for to `timeline_frames()`
-- the clipboard's rule ("put it here", never "here with black in front"),
imposed on every caller of the primitive. A drop names a place on the bed
and means it, and `Project::place` (the audio/further-lane half of the same
drop) already honoured one, so V1 was the odd lane out.
The clamp moves to the clipboard's own door, `PlaybackSession::paste_at`,
and the grouped branch of `place_stream_at` goes to `Project::paste`
directly with the frame the pointer named. Nothing else changes: a paste at
the playhead cannot be past the end anyway.
Pinned by `a_row_dropped_on_the_open_bed_lands_under_the_pointer`, which
walks the release's own chain -- `landing` as `place_frame` composes it,
the frame back through the rate as `insert_source` hands it over, and the
one engine door a row goes through -- and lands frame 300 where it used to
land 150.Merge remote-tracking branch 'origin/main' into worktree-agent-a3fe67eb0bcf4cbceAhmet Kaan Gümüş · 9ebff59Browse files
✨ 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.
🔀 merge(cleanup): the preview and the file read the same cues, and the end stays the end under a sound tweakAhmet Kaan Gümüş · 6b156d8Browse files
🐛 fix(subs+eos): the plate reads the map the file is written from, and a knob past the end leaves the end aloneAhmet Kaan Gümüş · 2bee9c3
🐛 fix(subs+eos): the plate reads the map the file is written from, and a knob past the end leaves the end alone The overlay and the timeline strip drew every subtitle track on the raw timeline clock while the export carried an embedded track through the cuts (export::timeline_cues), so a rippled timeline previewed one thing and wrote another. Both now ask that one map through PlaybackSession::timeline_cues -- preview and file agree by construction, and a standalone .srt keeps the timeline clock it always had. And the end of stream: is_eos promised that "any edit after the end revives the session", which a sound-only edit never did. The transport's own model says it should not -- eos means the picture worker ran out, reseek_audio starts no picture worker, and reviving on an EQ tweak would spend the Ended state that makes the next press restart from the top. The doc now states that rule and a test pins it.