Skip to content

style(interop): clear the clang-tidy findings the VMAFx profile reports on the vendored sources - #78

Merged
lusoris merged 3 commits into
masterfrom
fix/interop-tidy-clean
Oct 5, 2026
Merged

lusoris merged 3 commits into
masterfrom
fix/interop-tidy-clean

Conversation

@lusoris

@lusoris lusoris commented Oct 5, 2026

Copy link
Copy Markdown
Contributor

What & why

VMAFx vendors libpelorus/src/{interop,deband_params,denoise_params,qp_report_csv}.c and libpelorus/test/interop_test.c byte for byte and lints the copies at its own clang-tidy profile (modernize-*, C23). Measured there (clang-tidy 22.1.8, cpu lane): 59 findings across these files. This PR clears them at the source so the mirror stays byte-identical:

  • readability-function-size (8): the conformance test's long checks split into helpers; every assertion is kept.
  • bugprone-casting-through-void (4): blob headers and the directory entry are patched through memcpy on the byte buffer instead of a cast through void *.
  • modernize-use-nullptr (47): one NOLINTBEGIN/END(modernize-use-nullptr) block per translation unit, citing that MSVC's C mode has no nullptr and VMAFx ADR-1138.

No behaviour or ABI change. No ADR: implementation detail, and the NOLINT follows VMAFx ADR-1138.

Reproducer / smoke-test

meson setup build && ninja -C build && meson test -C build --suite=fast --print-errorlogs
clang-tidy --config-file=<vmafx>/.clang-tidy libpelorus/test/interop_test.c libpelorus/src/*.c -- -std=c23 -D_GNU_SOURCE -Ilibpelorus/include

Per-PR checklist (ADR-0100 / ADR-0108 — see CONTRIBUTING.md)

  • ADR for any non-trivial decision, indexed in docs/adr/README.md (n/a: implementation detail; NOLINT follows VMAFx ADR-1138)
  • Per-surface docs under docs/ for every user-discoverable surface (n/a: test and lint cleanup, no user-visible surface)
  • Research digest docs/research/NNNN-*.md (no digest needed: trivial)
  • Decision matrix = the ADR's Alternatives table (no alternatives: only-one-way fix)
  • AGENTS.md invariant note in the touched package (no rebase-sensitive invariants)
  • Changelog fragment changelog.d/<section>/*.md; concat-changelog-fragments.sh --check passes
  • Rebase note docs/rebase-notes.md if the FFmpeg patch stack is affected (no rebase impact: libpelorus sources only, no patch input changed)
  • Patch-stack sync: a libpelorus surface the patches consume changed (n/a: no surface changed)
  • Interop ABI (if touched) is append-only (n/a: ABI untouched)
  • Shader source (n/a: no shader change)
  • Touched files lint-clean (clang-format + clang-tidy); any // NOLINT cited
  • Conventional Commit subject; not committing to master directly

…ts on the vendored sources

VMAFx lints the vendored copies of these files at its own clang-tidy profile (modernize-*, C23). Clear what it reports: split the conformance test's long checks into helpers, patch blob headers through memcpy instead of casting the byte buffer through void *, and keep the NULL macro in one NOLINT(modernize-use-nullptr) block per translation unit because MSVC's C mode has no nullptr. No behaviour or ABI change.
@lusoris
lusoris merged commit 5f5614b into master Oct 5, 2026
8 checks passed
@lusoris
lusoris deleted the fix/interop-tidy-clean branch October 5, 2026 21:47
lusoris added a commit that referenced this pull request Oct 8, 2026
…onto master

The rebase onto 11e183e kept master's side of the two generated files at each
conflicting stop, so this commit renders them once at the tip.

CHANGELOG.md is rendered from changelog.d/ with
`scripts/release/concat-changelog-fragments.sh --write`; it now carries the
fragments from both this branch and master (#77, #78, #79, #89, #91).

.standards-baseline.json is re-recorded with the pinned engine (0af07a73,
`standardsctl baseline --record`) at 51 infractions: 28 HISS-01, 21 HISS-04,
two HISS-07. That is the branch's 56 minus the five interop and x265 CSV
entries that #77 cleared. Every recorded fingerprint is also present in
master's baseline (93) and in the branch's previous one (56), so no finding
is added. README and docs/development/build.md state the new count.

The FFmpeg patch stack regenerates byte for byte against n9.0.2, so it is
unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
lusoris added a commit that referenced this pull request Oct 8, 2026
…onto master

The rebase onto 11e183e kept master's side of the two generated files at each
conflicting stop, so this commit renders them once at the tip.

CHANGELOG.md is rendered from changelog.d/ with
`scripts/release/concat-changelog-fragments.sh --write`; it now carries the
fragments from both this branch and master (#77, #78, #79, #89, #91).

.standards-baseline.json is re-recorded with the pinned engine (0af07a73,
`standardsctl baseline --record`) at 51 infractions: 28 HISS-01, 21 HISS-04,
two HISS-07. That is the branch's 56 minus the five interop and x265 CSV
entries that #77 cleared. Every recorded fingerprint is also present in
master's baseline (93) and in the branch's previous one (56), so no finding
is added. README and docs/development/build.md state the new count.

The FFmpeg patch stack regenerates byte for byte against n9.0.2, so it is
unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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