Repository navigation
Fix the output conformance matrix's findings (task #58) - #220
Open
StuartCameronCode wants to merge 7 commits into
Open
StuartCameronCode wants to merge 7 commits into
StuartCameronCode wants to merge 7 commits into
Conversation
StuartCameronCode
force-pushed
the
stuart/58-output-conformance-matrix-findings-avi-r
branch
from
November 17, 2026 12:59
1031ee7 to
31b5a09
Compare
…e (task #58) VapourSynth runs the pipe clip's callbacks out of order: vspipe requests a new frame each time any completes, so one late early frame let the reader read to the end of the clip past it, and the frame then came back as whatever was read last. Measured: 6 wrong outputs in 320 plain runs under load, 0 after. The reader now keeps every frame until it has been served and is a window behind the oldest frame not yet served, with a memory cap for frames never asked for. A frame asked for after it was dropped raises instead of being replaced by another picture. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…rs exact; source-relative clicks (task #58) - Convert into AVI under an encoder priming reads every sound input late by P, so a sound ending with the window (the restored track) ended before the picture and -shortest dropped the last picture (49 of 50). Such a trim now stops at the window's length (-t), encode_end_args. - Audio Restoration reads MP1/MP2 with the float decoders: the default fixed-point decoders round with state carried between frames, so a seeked decode differed from the full one by one 16-bit step in ~40% of samples. The float decode is exact from any seek. - The matrix oracle expects each click at the source's own lag after its flash: conf_delayed.avi's MP3 is 23 ms late by libmp3lame's priming, which AVI can't mark; the copy cut's +8 ms is its nearest-packet rule. The restore cases compare against the render's decoder. - knownFailures is empty. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… into AVI (task #58) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ask #58) ffmpeg's discontinuity correction takes one offset per segment from whichever stream shows the reset first. When a segment's sound runs past its last picture (16 ms in conf_reset_offgrid.mpg, as a DVD cell's may), that is the sound, so every later picture landed off the grid: one 56 ms step, ffprobe read 125 fps and the app analysed 493 pictures for 100. The scan now also reads each packet's duration and position and makes a JoinPlan: each segment moves so its first picture follows the last by one frame, every stream of the segment alike. The copy runs with -copyts and a setts bitstream filter per stream (by packet index for streams that reset, by byte position for those that don't: subtitles); a sound packet that overhangs the next segment by more than half of itself is dropped (noise) and the log says so. Without a plan (no durations, streams resetting a different number of times) the copy is exactly as before. On conf_reset.mpg (on the grid) the copy times every picture and sound frame as ffmpeg's join did; on the off-grid fixture picture 50 is at 2.000 s (was 2.016), 25 fps, 100 pictures. The off-grid matrix test is an ordinary test now, and av_sync.events times an untimed picture one step after the last. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… in task #49's report Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… run's cause Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…'s correction (task #58 review) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
StuartCameronCode
force-pushed
the
stuart/58-output-conformance-matrix-findings-avi-r
branch
from
November 18, 2026 04:01
31b5a09 to
8e7be1a
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes the five failures task #49's output conformance matrix found. The matrix's
knownFailureslist is now empty: three full runs passed 450/450.Changes
-t,encode_end_args) instead of-shortest. Newtailmatrix cases trim to the last picture for every primed Convert codec into AVI.render_decoder), which give the same samples from any seek. Convert and the analysis keep FFmpeg's default decoder.pipe_sourceserved wrong frames when VapourSynth asked out of order.pipe_source_order_test.dart) reproduces the order that failed.JoinPlan), applied with-copytsand asettsfilter on each stream.CLAUDE.md, ENGINEERING_NOTES and a new report (
docs/reports/task-58-output-conformance-findings/, with its scripts) document the rules. Task #49's report has a correction.Testing
integration_output_conformance_test.dart(heavy) passed 450/450 in three full runs. A fourth run was void, and the report explains why.reset-ps/midmatrix cases and the off-grid join test pass.cargo test): passes, exceptsubtitle_integration_test, which needs the whisper add-on and couldn't run locally.a_planned_join_that_fails_falls_back_to_ffmpegs_correction, fails without the fallback.pipe_source_order_testandoutput_matrix_cases_test.Known edge cases (not in any fixture)
🤖 Generated with Claude Code