Skip to content

DFTTest: plan FFTs with FFTW_ESTIMATE so preview = encode (task #101) - #262

Open
StuartCameronCode wants to merge 14 commits into
mainfrom
stuart/101-dfttest-plans-its-ffts-with-fftw-patient
Open

StuartCameronCode wants to merge 14 commits into
mainfrom
stuart/101-dfttest-plans-its-ffts-with-fftw-patient

Conversation

@StuartCameronCode

@StuartCameronCode StuartCameronCode commented Nov 24, 2026 •

Copy link
Copy Markdown
Owner

What

DFTTest planned its four FFTs with FFTW_PATIENT, which times candidate plans in each process. Different plans round floats differently, so on x86 the same script could give one of several pictures. A preview and its encode run in two processes, so they could disagree. This is the same fault as FFT3DFilter's measure=1 (task #80). DFTTest has no argument that picks the planner, so the fix is a patch:

Ships in deps 1.18.0-rc4. deps-version.json still names rc3, so the new bundle checks skip until rc4 is published and pinned (release work).

Measurements (report: docs/reports/task-101-dfttest-fftw-planning/)

Machine PATIENT (rc3): cases with >1 picture, of 37 ESTIMATE
macOS arm64 (M1 local, CI) 0 0
macOS x64 under Rosetta (M1) 15 (up to 3 pictures) 0
Linux x64 runners, 3 runs × 2 9–15 0
Windows x64 runners, 3 runs × 3 15 0
macOS x64 runner (i7-8700B) 15 0
  • Affected: every 3D plan (tbsize > 1): the Noise Reduction DFTTest method, QTGMC's dfttest denoiser and its knlmeanscl fallback, and TemporalDegrain2 postFFT 3. 2D plans (havsfunc's prefilters) never split.
  • Size: 1–2 levels, in at most 0.135% of samples.
  • Interaction with FFT3DFilter: no FFTW problem is shared with FFT3DFilter's, and running FFT3DFilter after DFTTest in one process gives the same result as a fresh process.
  • Speed: ESTIMATE is within run-to-run noise everywhere. Against PATIENT it changes only the 3D cases, by ≤ 2 levels in ≤ 0.13% of samples.

Tests

  • Push gate: vapoursynth_integration_test.dart › dfttest FFTW planning (task #101) checks the marker and that a second process filters exactly as the first (from deps 1.18.0-rc4). It also checks the patch and that every script applies it after the thread-safety patch. ci-test 45001593065 is green on all four platforms.

  • Heavy: integration_dfttest_determinism_test.dart checks that six fresh previews and the lossless encode agree sample for sample, for the Noise Reduction DFTTest method, QTGMC's dfttest denoiser and TD2 postFFT 3 (a mixed graph with FFT3DFilter). In nightly 45001595186 (rc4 builds) every leg gave 6 previews 0 apart, preview vs encode 0: macOS arm64, x64, x64-v2; Linux x64, x64-v2; Windows x64, x64-v2.

  • Other nightly failures in that run, not from this change: each one also fails on main's recent nightlies, except the Windows one at the end.

    The rc4 Windows legs fail less than main's rc3 ones, which fail the FFT3DFilter determinism, akarin parity and several sweep rows.

Docs

CLAUDE.md ("DFTTest plans with FFTW_ESTIMATE", deps history rc4 row), ENGINEERING_NOTES, the reports index and NOTICES.

🤖 Generated with Claude Code

StuartCameronCode and others added 14 commits November 24, 2026 23:10
)

PATIENT timed DFTTest's plans per process, so a preview and its encode could
filter the same frame differently. patches/dfttest-bc5e018-fftw-estimate.patch,
applied after task #98's thread-safety patch on every platform, plans with
FFTW_ESTIMATE and marks the plugin's name; the deps scripts require the mark.
Push-gate and heavy tests, gated on deps 1.18.0-rc4; report scripts.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… merge)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…S lists the patch; test skips comment lines

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…s rc4 builds

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… the runner's CPU name

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…processes; CLAUDE.md rule, engineering note, index row, deps history

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…T wording

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Its runs' results are in docs/reports/task-101-dfttest-fftw-planning/data/ci.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…on four platforms

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…rding in the engineering note

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@StuartCameronCode
StuartCameronCode force-pushed the stuart/101-dfttest-plans-its-ffts-with-fftw-patient branch from 2465c7b to 768e102 Compare November 24, 2026 12:11
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.

1 participant