Repository navigation
fix(deinterlace): Soft Telecine left Bwdif's template block in the script (#108) - #111
Merged
Merged
Conversation
…ript (#108) Each deinterlace method's arm removed the other methods' template blocks by hand. When Bwdif was added, the QTGMC and IVTC arms gained the new remove_block line and the Soft Telecine arm did not, so its script kept the whole Bwdif block with {{BWDIF_FIELD}} unsubstituted. vspipe reported that as a Python SyntaxError, failing both preview and encode for every source with Soft Telecine selected. Block selection now happens once, from a DEINT_METHOD_BLOCKS table, before the per-method match: the selected method's block is kept and every other is dropped. A unit test with a catch-all-free match keeps the table complete when a method is added. Tests: test_161 generates the encode and preview scripts for every method and asserts each emits only its own call with no placeholder left; a script-generation case in integration_filter_parameters_test; and a heavy preview + encode of soft_telecine_test.mkv. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014GLXdGLfPwgYjW1AkonGqN
The FFV1 losslessness control built its source reference with `-s 720x576`, mirroring the worker's old decoder. #106 changed the worker to decode the full stored frame with `-apply_cropping codec` and never rescale, so the reference became a 702->720 rescale of the clean-aperture fixture while the worker's output was the true stored frame. The nightly has failed on this one test on every platform since both landed on main. Decode the reference with PreviewGenerator.sourceDecodeOptions, the same option the worker uses. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014GLXdGLfPwgYjW1AkonGqN
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 #108.
Cause
Each deinterlace method's arm in
script_generator.rsremoved the other methods' template blocks by hand. When Bwdif was added (1d77af1), the QTGMC and IVTC arms gained the newremove_blockline and the Soft Telecine arm did not. Its script therefore kept the whole Bwdif block with{{BWDIF_FIELD}}unsubstituted, which vspipe reports as a PythonSyntaxError. Preview and encode both failed for every source with Soft Telecine selected, in v1.0.0 and v1.1.0.Fix
Block selection now happens once, before the per-method
match, from aDEINT_METHOD_BLOCKStable: the selected method's block is kept and every other is dropped. The arms no longer remove each other's blocks, so a new method can't repeat this.Tests
test_161: generates the encode and preview scripts for every method and asserts each emits only its own call with no placeholder left. Fails without the generator change.DeinterlaceMethodvariant won't compile until listed.integration_filter_parameters_test.dart.soft_telecine_test.mkvinintegration_new_passes_test.dart.No test previously generated a script with
DeinterlaceMethod::SoftTelecine, which is why this shipped.🤖 Generated with Claude Code
https://claude.ai/code/session_014GLXdGLfPwgYjW1AkonGqN