Repository navigation
fix(preview): run VDecimate in the IVTC / Soft Telecine preview, in the encode's phase (task #46) - #206
Merged
StuartCameronCode merged 2 commits intoNov 16, 2026
Conversation
…he encode's phase (task #46) The preview ran VFM without VDecimate while preview_output picked its frame as if decimated (local * 4/5 of an undecimated window), so it showed the film frame of source frame target - ceil(radius/5): one early at radius 5, three at 12; 22 of 135 previews were the encode's frame. IVTC then a frame rate conversion converted the undecimated 29.97 at the wrong ratio. The preview now runs VDecimate on a clip arranged as the encode's: window frames before the in-point dropped (before VFM for IVTC), copies of the first frame putting the cycles in the encode's phase, and the clip ended where the encode's ends (the app sends endFrame with a preview job; Soft Telecine's last cycle filled as pipe_frames does). FrameMap::Decimate declares radius cycle + 1. Each frame is tagged with its index; the script reads which frame of the target's cycle was dropped and picks between the two outputs preview_output_in computed. Stabilize's preview pitch lookup follows the padded clip. 147 of 147 previews are now the encode's frame (MAD 0.00 on 8-bit). Report: docs/reports/issue-46-ivtc-preview. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
#46) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
StuartCameronCode
force-pushed
the
stuart/46-ivtc-soft-telecine-preview-shows-a-frame
branch
from
November 16, 2026 05:26
dc07b01 to
d721207
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.
Problem
With Deinterlace set to IVTC, or to Soft Telecine at 29.97/30 fps, the preview ran VFM but skipped VDecimate.
ProcessingPipeline::preview_outputstill picked its frame as though the clip had been decimated, so the preview showed the film frame of source frametarget - ceil(radius/5):Fix
The preview now runs VDecimate itself, on a clip arranged the way the encode's clip is:
e0 mod cycleof them, so VDecimate's cycles fall in the encode's phase.endFrame; without it the worker takestotalFrames. For Soft Telecine the last cycle is filled the waypipe_framesfills it.Which frame of the target's cycle VDecimate drops depends on the picture, so the worker computes the output index for both cases (
DecimatePreview::after_drop). The script tags each frame with its index, reads the tag at the target's position, picks the matching index, and printsPREVIEW_DECIMATE:corr=N. The worker then reports the frame actually shown onPREVIEW_INFO.Other changes:
FrameMap::Decimatenow declares radiuscycle + 1.first + skip - pad.Report
docs/reports/issue-46-ivtc-preview/holds:It is linked from ENGINEERING_NOTES and the reports index. CLAUDE.md is updated ("Previewing every output frame", "One script template").
Testing
Rust unit tests:
cargo test --lib: 591 passed.Rust script-generation test:
test_250covers both methods.test_161,test_240andtest_248are updated.filter_integration_test: 232 passed.Heavy suite: the new
integration_ivtc_preview_test.dartchecks previews against a lossless encode and against independently regenerated film frames. It covershard_telecine_test.avi, the 10-bit ProRes telecine clip,soft_telecine_test.mkv, several radii, trims, and IVTC followed by 59.94. The run also included frame mapping, source grid, seek alignment and high-bit-depth: 134 tests, all passing.Limitation: everything was measured on Apple Silicon only, with synthetic 3:2 pulldown fixtures.
🤖 Generated with Claude Code