Repository navigation
fix(pipeline): run Sharpen and the crop in their documented order (#109) - #112
Merged
Merged
Conversation
…arning (#109) The Sharpen pass warned that it "runs before Noise Reduction, so the denoiser will soften much of this again". It never did: Sharpen already ran after every clean-up pass. Remove the warning and pin the order the remaining advice talks about against enabledPasses. Sharpen was not last, though. It ran ahead of Chroma Fixes, Colour Correction, Stabilize and the resize, so a downscale softened the sharpened edges again and an upscale enlarged the halos. Move it to after Crop & Resize and before Film Grain, in both templates, the Rust and Dart pass orders and the pass list. Presets and saved jobs that combine Sharpen with a resize render slightly differently, and Sharpen now works at the output resolution. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014GLXdGLfPwgYjW1AkonGqN
The filter table was in no particular order, so the README never said what the pipeline order is. Number the rows in run order, explain the parts a table cannot show (the crop runs first, the resize late; custom code, colour conversion and borders follow the filters), and pin the table to PassListPanel.stages with a test. Also correct the Stabilize row, which said a crop afterwards removes the edges it exposes. The crop is applied before Deinterlace. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014GLXdGLfPwgYjW1AkonGqN
#109) The crop was a separate block at the top of both templates, ahead of Deinterlace, while the comments, the in-app descriptions and the README all said Stabilize runs last before cropping so that a crop can remove the edges it exposes. It could not. Move the crop to directly before the resize, so the order is Stabilize, Rotate / Flip, Crop, Resize, Sharpen. The pass now appears once in the pass order, at that position. Behaviour changes: crop sides refer to the picture after a rotation, every earlier pass works on the uncropped frame, Edge Repair rebuilds the uncropped edge, and the automatic measurements (levels, white balance, chroma alignment) see the area the crop will remove. 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 #109.
What was wrong
What changed
Removed the false warning from
pass_advice.dart.Moved Sharpen to after Crop & Resize and before Film Grain, in both
.vpytemplates, the Rust and Dart pass orders, and the pass list (it now sits at the top of "Finishing").README and
docs/ENGINEERING_NOTES.mdrecord the new order and why.Moved the crop from the top of both templates (ahead of Deinterlace) to directly before the resize, so the order is Stabilize → Rotate / Flip → Crop → Resize → Sharpen. Until now a crop could not remove the edges Stabilize exposes, although the comments, descriptions and tests all said it did.
Documentation
readme_pipeline_order_test.dartfails if that table andPassListPanel.stagesdisagree.Behaviour changes
Testing
flutter test --exclude-tags heavy: passes.cargo test: passes exceptsubtitle_integration_test, which needswhisper-cliand it is not installed locally.integration_new_passes_test.dartencodes each sharpen method after a resize and checks the output size; it andintegration_filter_pipeline_test.dartpass. The rest of the heavy suite was not run locally.test_110(Rust) andpass_list_stages_test.dartnow pin Sharpen after the resize and before the grain;pass_advice_test.dartasserts the Sharpen + Noise Reduction pair is silent.🤖 Generated with Claude Code
https://claude.ai/code/session_014GLXdGLfPwgYjW1AkonGqN