ADR-0158: Netflix#1486 "Port motion updates" — verified present in fork¶
- Status: Accepted
- Date: 2026-04-24
- Deciders: Lusoris, Claude (Anthropic)
- Tags: upstream-port, motion, netflix-upstream, verification
Context¶
Backlog item T4-1 called for porting Netflix upstream PR #1486 "Port motion updates", merged upstream on 2026-04-20 as two commits:
-
a44e5e6—libvmaf/feature: port motion updates, bugfix for edge mirroring. Addsmotion_max_valoption (default 10000.0; clips motion scores above), fixes theedge_8mirroring bug (height - (i_tap - height + 1)→height - (i_tap - height + 2)) across the scalar + AVX2 + AVX-512 paths, addsVMAF_integer_feature_motion3_scoreoutput inextract_force_zero, and moves SIMD dispatch out ofinit. -
62f47d5—loosen assertion precision for motion mirror bugfix. Netflix goldenassertAlmostEqualupdates acrosspython/test/{feature_extractor_test.py,quality_runner_test.py, vmafexec_feature_extractor_test.py,vmafexec_test.py}— the numerical-gate coordinated with commit 1.
A verification pass confirmed that both commits are already fully present in the fork's master:
edge_8+ 2fix: present incore/src/feature/integer_motion.c:240,x86/motion_avx2.c:147,x86/motion_avx512.c:147.motion_max_valoption: present atinteger_motion.c:57,118-120and in the options table.VMAF_integer_feature_motion3_score: present atcore/src/feature/alias.c:92and ininteger_motion.coutput plumbing.- Netflix golden updates: the 73
(results[N][key], value, places=)tuples from upstream commit62f47d5are present in the fork's python tests (verified programmatically by parsing all four files for the exact triples).
The fork's port didn't land as a single PR matching Netflix#1486 1:1. Fork PR #45 (9371a0aa feat(libvmaf/feature): port upstream motion updates (Netflix PR #1486)) was opened but never merged; its substance was folded into master incrementally via later motion3 / blend / five-frame-window / moving-average commits that went through separate PRs. The end state is equivalent: every line the upstream patch would add is in the fork today.
Why this matters: T4-1 on the backlog was sized M (motion metric math + cross-backend-diff + Netflix golden gate). Re-porting would be a no-op at best and a conflict-resolution exercise at worst. The verification + paper trail is the right closing move.
Decision¶
Close T4-1 as "verified present; no port PR needed." This ADR + a rebase-notes entry document the coverage so that future /sync-upstream runs don't re-discover Netflix#1486 as pending.
No code change. No CHANGELOG entry (no user-visible delta — everything upstream shipped is already in the fork's released binaries). Backlog item flipped to done with a verification reference.
Alternatives considered¶
| Option | Pros | Cons | Why not chosen |
|---|---|---|---|
| Doc-only close (this ADR) | Paper trail for future sync-upstream; no code churn; honest representation of current state | Small docs-only PR adds a commit to master | Chosen via popup — next /sync-upstream gets the coverage context without re-auditing |
| Open a port PR anyway | Keeps 1:1 commit-to-port mapping across upstream/fork | No-op diff; pure churn; conflict resolution with existing motion3 / blend work | Rejected — wasted cycles |
| In-session close (no PR) | Zero commits | No tracked paper trail; future sync-upstream re-checks #1486 from scratch | Rejected via popup |
| Supersede fork PR #45 | Would close the unmerged PR explicitly | PR #45 is already stale (last activity >6 months); GitHub auto-closes on push reference | Not needed — the branch is long-dead |
Consequences¶
- Positive:
/sync-upstreamwon't re-flag Netflix#1486 as a pending port.- Future rebase-audits have a cite for "this upstream PR is already absorbed via fork-native work, no cherry-pick required."
- Backlog tier T4 shrinks by one.
- Negative: None.
- Neutral / follow-ups:
- Fork-local motion extensions (five-frame-window, moving-average, blend, fps_weight) are additions on top of Netflix#1486; future upstream changes to motion extractor internals may conflict with them. That invariant is noted in
core/src/feature/AGENTS.mdunder the existing motion_v2 NEON entry. - The pre-existing
readability-braces-around-statementswarnings oninteger_motion.h:38-48(noticed during verification) are upstream style carried forward — ADR-0141 would catch them on the next touch of that header. Not a blocker here since nothing changed.
Verification¶
ninja -C build && meson test -C build→ 35/35 pass (no delta vs pre-verification master).- Markers verified present via:
grep -n "height - (i_tap - height + 2)\|motion_max_val\|VMAF_integer_feature_motion3_score" \
core/src/feature/integer_motion.c \
core/src/feature/alias.c \
core/src/feature/x86/motion_avx2.c \
core/src/feature/x86/motion_avx512.c
- 73-triple golden-value match on python tests verified by programmatic AST-style scan (details in subagent report).
git status→ clean; this PR contributes no code hunks.
References¶
- Upstream PR: Netflix/vmaf#1486 ("Port motion updates"), MERGED 2026-04-20.
- Upstream commits:
a44e5e6,62f47d5(inNetflix/vmaf@master). - Fork PR #45 (never merged; 9371a0aa) — tracked the original port attempt; substance landed via incremental fork-native commits instead.
- ADR-0024 — Netflix golden gate.
- ADR-0142 — Netflix-authority carve-out for coordinated golden-value updates; would apply if a real port PR were needed here.
- ADR-0145 — fork-local
motion_v2_neon.c; unrelated to this upstream PR but touches the same file family on rebase. - rebase-notes 0051 — sync-upstream invariants.
- Backlog:
.workingdir2/BACKLOG.mdT4-1. - User direction 2026-04-24 popup: "T4-1 Port motion updates Netflix#1486" → "Doc-only PR (Recommended)".