Skip to content

fix(core): re-register CPU motion_v2 extractor + post-flush test order (ADR-1052) - #673

Merged
lusoris merged 1 commit into
masterfrom
fix/arm-motion-v2-re-register-and-test-order
Jun 4, 2026
Merged

lusoris merged 1 commit into
masterfrom
fix/arm-motion-v2-re-register-and-test-order

Conversation

@lusoris

@lusoris lusoris commented Jun 4, 2026

Copy link
Copy Markdown
Contributor

Summary

Regressions fixed

Test Root cause
test_motion_v2_missing vmaf_get_feature_extractor_by_name("motion_v2") returned NULL on CPU-only builds after deregistration
test_motion_three_frame get_score(motion2_score) called before flush(); post-port contract defers emission to flush

Both fail on ARM64 CPU-only CI (Build — Ubuntu ARM clang (CPU)).

Test plan

  • meson test -C build --suite=fast test_integer_motion_v2_coverage — passes
  • meson test -C build --suite=fast test_motion_min_dim — motion_v2 sub-tests pass
  • vmaf_get_feature_extractor_by_name("motion_v2") != NULL on all CPU builds

Deliverables checklist (ADR-0108)

  • Research digest: docs/research/1052-arm-motion-v2-re-register.md (no digest needed: trivial)
  • Decision matrix: ADR-1052 ## Alternatives considered
  • AGENTS.md invariant: no rebase-sensitive invariants beyond what rebase-notes.md covers
  • Reproducer / smoke-test command: in PR description above
  • Changelog fragment: changelog.d/fixed/1052-arm-motion-v2-re-register.md
  • Rebase notes: docs/rebase-notes.md updated

state.md

T-ARM-MOTION-V2-MISSING-2026-06-04 added to Recently closed.

no rebase impact: no upstream-mirrored C paths or public API touched; integer_motion_v2.c registration is fork-local.

🤖 Generated with Claude Code

…order (ADR-1052)

PR #532 / commit 6bb5464 ported upstream a4a1492d3 and inadvertently
removed integer_motion_v2.c from the meson CPU source list and dropped
the extern declaration + list entry from feature_extractor.c.  On every
CPU-only build (including ARM64 CI lanes), vmaf_get_feature_extractor_by_name(
"motion_v2") returned NULL, causing test_motion_v2_missing and all related
test files to fail their "motion_v2 extractor missing" assertion.

Secondary failure: test_motion_three_frame_extract_emits_scores called
vmaf_feature_collector_get_score for motion2_score BEFORE flush().  The
post-port contract defers motion2 emission to flush(); the get_score must
come after.

Fix:
1. Re-add integer_motion_v2.c to core/src/meson.build CPU source list.
2. Restore extern VmafFeatureExtractor vmaf_fex_integer_motion_v2 and
   &vmaf_fex_integer_motion_v2 in feature_extractor.c.
3. Move get_score(motion2_score, frame=2) to after flush() in
   test_integer_motion_coverage.c::test_motion_three_frame_extract_emits_scores.

Unblocks: test_motion_v2_missing, test_motion_three_frame,
test_integer_motion_v2_coverage, test_motion_min_dim (motion_v2 sub-tests).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@lusoris
lusoris marked this pull request as ready for review June 4, 2026 08:31
Copilot AI review requested due to automatic review settings June 4, 2026 08:31
@lusoris
lusoris merged commit 4cee54c into master Jun 4, 2026
69 of 106 checks passed
@lusoris
lusoris deleted the fix/arm-motion-v2-re-register-and-test-order branch June 4, 2026 08:32
@lusoris
lusoris removed the request for review from Copilot June 4, 2026 08:52
lusoris added a commit that referenced this pull request Jun 6, 2026
#702)

PR #673 (ADR-1052) added the extern declaration and list entry for
vmaf_fex_integer_motion_v2 to feature_extractor.c, but meson.build
compiles feature_extractor.cpp. The .cpp file still carried the stale
comment "removed merged into vmaf_fex_integer_motion" and omitted both
the extern declaration and the &vmaf_fex_integer_motion_v2 list entry.

Result: vmaf_get_feature_extractor_by_name("motion_v2") returns NULL on
every CPU-only static build, failing test_integer_motion_v2_coverage with
"motion_v2 extractor missing".

Fix: mirror the two-line change from .c into .cpp by adding the extern and
inserting &vmaf_fex_integer_motion_v2 into feature_extractor_list[] between
&vmaf_fex_integer_motion and &vmaf_fex_integer_vif.

Co-authored-by: Lusoris <lusoris@pm.me>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
@lusoris lusoris added this to the 1.0.0 — First release milestone Sep 4, 2026
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