Skip to content

One Strength control for Noise Reduction and Sharpen (issue #177) - #290

Merged
StuartCameronCode merged 1 commit into
mainfrom
stuart/140-one-simple-strength-control-for-noise-re
Nov 28, 2026
Merged

StuartCameronCode merged 1 commit into
mainfrom
stuart/140-one-simple-strength-control-for-noise-re

Conversation

@StuartCameronCode

Copy link
Copy Markdown
Owner

Closes #177.

What changes

In simple mode, each Noise Reduction and Sharpen method now has one Strength selector: Light, Medium, Strong or Very strong. The selector sets the method's real parameters. In simple mode it replaces the controls it sets. Advanced mode hides the selector and shows those controls. When the values match no step (they were edited in Advanced mode), the selector shows Custom.

Method What Strength sets
SMDegrain tr, thSAD, thSADC, and a new scene-change threshold thSCD1
MCTemporalDenoise profile, low → very high
QTGMC built-in EZDenoise
mClean strength, thSAD, rn
LSFmod strength, overshoot, undershoot
CAS sharpness
aWarpSharp2 depth

Medium is the existing defaults, so existing output does not change. The one exception is QTGMC built-in: its old default (EZDenoise 0) did nothing, and it is now 5. The other steps were measured on real footage with added noise and blur, in about 2,900 worker runs. The report is docs/reports/issue-177-strength-mapping/, and its data/steps.json pins the schemas: strength_presets_test.dart and test_271 both read it.

Findings beyond the steps

  • SMDegrain switched itself off on heavy noise. havsfunc's thSCD1=400 is below the SAD of heavy noise alone, so every frame read as a scene cut and nothing was averaged. The new smDegrainThSCD1 defaults to 400, which leaves the script unchanged byte for byte. Strong and Very strong set it to 800. On σ 9 noise that takes the output from 29.1 dB to 36.8 dB, and real cuts are still detected.
  • MCTemporalDenoise's Sigma does nothing. That is follow-up task fix(worker): pass the source comment to ffmpeg in a file (#138) #141.

Noise hint

When the background noise measurement judged the source noisy, the Noise Reduction panel suggests a Strength step for the measured level. It is advisory only: it never changes a value, and it shows only for an enabled pass whose method has a Strength.

Built-in presets: small changes in output

Built-in presets now use named steps, so simple mode never shows "Custom" for them:

  • DV Camcorder, Low-Light and SD Tape → HD: noise reduction tr 1 → 2.
  • VHS Cleanup: LSFmod 80/1 → 50/8 (strength / overshoot).
  • SD Tape → HD: CAS 0.3 → 0.4.
  • NoiseReductionParameters.fromPreset: light / moderate / heavy are now SMDegrain's Light / Medium / Strong steps.

The selectors carry NEW badges (1.8.0). CLAUDE.md, README, FILTER_SCHEMA.md, ENGINEERING_NOTES and the reports index are updated.

Testing (macOS arm64)

  • cargo test: all green, including test_271 (every step reaches the generated script).
  • flutter test --exclude-tags heavy,gpu: 2019 passed. This includes the new strength_presets_test.dart, preset_visibility_test, filter_schema_curation_test, parameter_copy_with_test and the script-generation coverage in integration_filter_parameters_test.
  • Heavy integration_strength_test.dart: 7/7 passed. It encodes with each method at each step and checks that a stronger step does more.
  • In review, I re-ran the relevant subsets: all passed, and nothing needed fixing.
  • The measurements were on macOS arm64 only. Windows and Linux are covered by CI.

🤖 Generated with Claude Code

… task #140)

In simple mode every Noise Reduction and Sharpen method has one Strength
selector (Light / Medium / Strong / Very strong): a schema parameter preset
that hides the controls it sets, with Medium = the existing defaults. The
other steps were measured on real footage with added noise (sigma 2-9) and
blur (0.5-1.6 px) through the worker itself; the evidence is
docs/reports/issue-177-strength-mapping, and strength_presets_test.dart and
test_271 pin the schemas to its data/steps.json.

- ParameterPreset gains `custom` (shown when the values match no option),
  `optionDescriptions` and `sinceAppVersion` (NEW badge on the selector, its
  section, the method dropdown and the pass row).
- SMDegrain did nothing at heavy noise: havsfunc's thSCD1=400 makes every
  noisy frame a scene cut. New smDegrainThSCD1 (default 400, left out of the
  script at 400); Strong and Very strong set 800 (sigma 9: 29.1 -> 36.8 dB,
  real cuts still detected).
- QTGMC built-in's EZDenoise default 0 did nothing; it is now 5 (Medium).
- Schema maximums raised where a step needed it (thSAD 2000, thSADC 1000,
  EZDenoise 10, LSFmod strength 500); mClean's motion threshold moves into
  its main section.
- fromPreset light/heavy and the built-in presets land on named steps (DV,
  Low-Light, SD Tape -> HD NR tr 1 -> 2; VHS LSFmod 80/1 -> 50/8; SD -> HD CAS
  0.3 -> 0.4).
- Noise Reduction panel: an advisory line suggesting a step from the
  measured noise score, for a source the worker judged noisy.
- MCTemporalDenoise's Sigma was found inert: task #141.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@StuartCameronCode
StuartCameronCode force-pushed the stuart/140-one-simple-strength-control-for-noise-re branch from 17642d3 to d033b80 Compare November 28, 2026 10:46
@StuartCameronCode
StuartCameronCode merged commit 9439338 into main Nov 28, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feedback & Feature Requests: Noise Reduction, Sharpening, RIFE Interpolation, Apple Silicon Optimization & Watermark Removal

1 participant