feat(upstream): port c70debb1 — adm+vif test deltas#211
Merged
Conversation
Cherry-pick the additive halves of Netflix upstream commit c70debb ("libvmaf/test: port new adm/vif/speed tests", Kyle Swanson, 2026-04-28). Adds: - libvmaf/src/feature/adm_csf_tools.h (verbatim, declares the inline adm_native_csf DLM-CSF helper). - libvmaf/test/test_adm_csf.c (verbatim modulo `static` on almost_equal + clang-format reflow; 2 mu_assert cases). - libvmaf/test/test_barten_csf.c (verbatim modulo `static` on almost_equal + clang-format reflow; 23 mu_assert cases over barten_rod_cone_sens / barten_mtf / barten_csf / linear_interpolate / barten_watson_blend_csf). - libvmaf/test/meson.build registers the two executables and test() entries. The other two halves of c70debb are deliberately deferred: - test_vif_tools.c depends on the upstream `vif` runtime-helper chain (NUM_KERNELSCALES, vif_validate_kernelscale, vif_get_filter, speed_get_antialias_filter, a [_][5][65] filter table) that the fork skips per Research-0024 Strategy E to protect the ADR-0138 / 0139 / 0142 / 0143 SIMD bit-exactness contract. - test_speed_chroma.c #includes feature/speed.c, which the fork does not yet ship (audit row T-NEW-1). Tracked alongside the 2026-04-29 quarterly upstream-backlog re-audit (PR #205); resolves audit row T-NEW-2. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
c1c4ee3 to
29a3b12
Compare
…ow-up) MinGW64's <math.h> does not expose M_PI by default, causing adm_csf_tools.h:36 to fail with "'M_PI' undeclared" on the Windows CI job. Define _USE_MATH_DEFINES before <math.h> (so MSVC and conforming MinGW configurations expose the constant) and add a literal fallback after the include so any non-conforming libm still compiles. Linux/glibc was already fine; verified test_adm_csf still passes. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.
Summary
c70debb1("libvmaf/test: port new adm/vif/speed tests", Kyle Swanson,
2026-04-28): the new
adm_csf_tools.hheader (declaring theinline
adm_native_csfDLM-CSF helper) and two new unit-testfiles:
test_adm_csf.c(2 cases) +test_barten_csf.c(23cases).
2026-04-29 quarterly upstream-backlog re-audit (PR #205).
c70debb1are deliberately deferred:test_vif_tools.cdepends on the upstreamvifruntime-helperchain (
NUM_KERNELSCALES,vif_validate_kernelscale,vif_get_filter,speed_get_antialias_filter, a[NUM_KERNELSCALES][5][65]filter table) that the fork skipsper Research-0024
Strategy E to protect the ADR-0138 / 0139 / 0142 / 0143 SIMD
bit-exactness contract.
test_speed_chroma.c#includesfeature/speed.c, which thefork does not yet ship (audit row T-NEW-1).
Test plan
meson setup build-cpu libvmaf -Denable_cuda=false -Denable_sycl=false && ninja -C build-cpu. Clean.meson test -C build-cpu test_adm_csf test_barten_csf→ 2 / 2 OK.meson test -C build-cpu→ 39 / 39 OK.clang-tidy -p build-cpu libvmaf/test/test_adm_csf.c libvmaf/test/test_barten_csf.c→ 0 surfacing warnings (one// NOLINTNEXTLINE(readability-function-size)ontest_barten_csfwith inline justification per CLAUDE.md §12 r12 + ADR-0141: the long verbatimmu_assertlist is held against upstream so future syncs stay trivial).pre-commit run --files <touched>→ all hooks pass.make test-netflix-golden→ the 3 canonical golden VMAF assertions remain green; the 9 unrelated failures (NIQE pickle / PyPSNR / FileSystemResultStore) are pre-existing on master and untouched by this PR.Reproducer:
meson setup build-cpu libvmaf -Denable_cuda=false -Denable_sycl=false ninja -C build-cpu test_adm_csf test_barten_csf meson test -C build-cpu test_adm_csf test_barten_csfDeep-dive deliverables (ADR-0108)
docs/rebase-notes.mdupstream-merge marker.🤖 Generated with Claude Code