ADR-0994: Fix Coverage Gate build break — integer_motion.c compile error¶
- Status: Accepted
- Date: 2026-06-03
- Deciders: Lusoris
- Tags:
ci,coverage,build,motion
Context¶
The Coverage Gate (ADR-0922) has been failing on every master push since commit c658b3c452 with a build error rather than a coverage threshold failure:
integer_motion.c:324:49: error: 'VmafFeatureExtractor' has no member
named 'prev_prev_ref'; did you mean 'prev_ref'?
This caused the entire coverage job to abort before gcovr ran, so no coverage report was produced. Two related bugs existed simultaneously:
-
integer_motion.ccompile error:extract()referencedfex->prev_prev_ref, a field that does not exist onVmafFeatureExtractor. The struct only hasprev_ref(one-frame-back). Themotion_five_frame_windowfeature requires a two-frames-back reference not yet plumbed through the framework (deferred per ADR-0337).integer_motion_v2.calready handled this correctly by rejectingmotion_five_frame_window=trueininit()with-ENOTSUP. -
feature_extractor.cpplinker error:feature_extractor.cppstill declaredextern VmafFeatureExtractor vmaf_fex_integer_motion_v2and referenced it infeature_extractor_list[], even though the corresponding.csource was removed from the meson build.feature_extractor.chad already been updated to remove this declaration, butfeature_extractor.cpp(the file compiled by meson) had not.
Decision¶
Fix both issues in a single targeted patch:
-
In
integer_motion.c: addlog.hinclude and an-ENOTSUPguard ininit()whenmotion_five_frame_window=true, mirroring the pattern ininteger_motion_v2.c. Replace the dead&fex->prev_prev_refreference inextract()with&fex->prev_ref. Add a comment documenting the deferral and reversibility. -
In
feature_extractor.cpp: remove theextern VmafFeatureExtractor vmaf_fex_integer_motion_v2declaration and its entry infeature_extractor_list[], matchingfeature_extractor.c. Add the same comment citing the upstream merge.
Alternatives considered¶
| Option | Pros | Cons | Why not chosen |
|---|---|---|---|
Add prev_prev_ref to struct | Unblocks 5-frame mode | Requires picture-pool refactor (ADR-0337, ADR-0152) — multi-PR effort | Deferred per ADR-0337; wrong scope |
Add integer_motion_v2.c to meson | Restores CPU motion_v2 symbol | Upstream merge intentionally removed it; reverting diverges | Diverges from upstream |
| Lower coverage floor | Unblocks CI | Hides the build break | Against ADR-0637 / ADR-0922 |
Consequences¶
- Positive: the Coverage Gate can now execute and report an actual coverage percentage instead of aborting at the build step. The gate was silently broken for all master pushes since
c658b3c452. - Negative:
motion_five_frame_window=truenow returns-ENOTSUPon bothmotionandmotion_v2(the v2 restriction was already in place). - Neutral / follow-ups: the
prev_prev_refplumbing work (ADR-0337) remains deferred. When that PR lands, both extractors must flip their-ENOTSUPguards to realprev_prev_reflookups per the rebase-notes ledger.
References¶
- ADR-0337: motion_v2 public option surface — defers
prev_prev_ref. - ADR-0922: coverage ratchet / 70% floor.
- ADR-0152:
vmaf_read_picturesmonotonic-index decomposition. - CI failure:
c658b3c452— Coverage Gate broken on every push since.