Skip to content

fix(cli): say "problem scoring picture" when libvmaf fails to score a frame - #2254

Merged
lusoris merged 1 commit into
masterfrom
fix/cli-extractor-error-message
Oct 6, 2026
Merged

lusoris merged 1 commit into
masterfrom
fix/cli-extractor-error-message

Conversation

@lusoris

@lusoris lusoris commented Oct 6, 2026

Copy link
Copy Markdown
Contributor

Summary

Closes T-CLI-EXTRACTOR-ERROR-PROPAGATION-2026-10-05. When vmaf_read_pictures() failed (an extractor refusing a frame or its options, e.g. float_ms_ssim on a 16x16 picture or integer ADM refusing a viewing geometry), the CLI printed problem reading pictures, one word away from the input read failure it prints as problem while reading pictures (exit 102). The pictures had been read; libvmaf could not score them.

  • core/tools/vmaf.cpp prints problem scoring picture N: libvmaf returned E through a small helper, after the libvmaf message that names the extractor. The exit status (the libvmaf code, 234 for -EINVAL) and the read-failure wording and exit 102 are unchanged.
  • core/tools/test/test_vmaf_score_error_message.sh (suite fast, positive / negative / boundary): a refused frame gives exit 234 and problem scoring picture 0, neither old wording appears, and a truncated input still gives exit 102 with problem while reading pictures. On the previous binary it fails with problem reading pictures.
  • docs/usage/cli.md exit-code table lists the case; the SYCL Windows and NR-metric docs quote the new line.
  • tidy: cpu core/tools/vmaf.cpp 0 findings (scripts/dev/tidy-lane.sh --only core/tools/vmaf.cpp --jobs 4 cpu, clang-tidy 22.1.8); scripts/dev/preflight.sh --stage msvcism passes.

Reproducer

meson setup core/build-cpu core -Denable_cuda=false -Denable_sycl=false && ninja -C core/build-cpu tools/vmaf
meson test -C core/build-cpu test_vmaf_score_error_message test_vmaf_read_error_exit

Deliverables (ADR-0108)

  • Research digest — no digest needed: trivial.
  • Decision matrix — no alternatives: only-one-way fix (the row asks the CLI to tell the two cases apart; the exit status is kept for scripts).
  • AGENTS.md invariant note — no rebase-sensitive invariants.
  • Reproducer / smoke-test command — above.
  • CHANGELOG fragment — changelog.d/fixed/cli-scoring-error-message.md.
  • Rebase note — no rebase impact: one fork-edited line of vmaf.cpp's frame loop, covered by the new test.
  • Docs — docs/usage/cli.md, docs/backends/sycl/windows.md, docs/ai/models/nr_metric_v1.md.
  • State — row moved to Recently closed in docs/state.md.

… frame (#2254)

* fix(cli): say "problem scoring picture" when libvmaf fails to score a frame

vmaf_read_pictures() failing was printed as "problem reading pictures", the
wording of the input read failure ("problem while reading pictures", exit
102), so an extractor refusing a frame or its options read like a broken
input file.

The CLI now prints "problem scoring picture N: libvmaf returned E" after the
libvmaf message that names the extractor. The exit status and the read-failure
wording are unchanged. The exit-code table of docs/usage/cli.md lists the
case.

Closes T-CLI-EXTRACTOR-ERROR-PROPAGATION-2026-10-05.
@lusoris
lusoris force-pushed the fix/cli-extractor-error-message branch from 54d8bd8 to 2d8fcf3 Compare October 6, 2026 10:43
@lusoris
lusoris merged commit 2d8fcf3 into master Oct 6, 2026
5 of 79 checks passed
@lusoris
lusoris deleted the fix/cli-extractor-error-message branch October 6, 2026 10:43
@github-actions github-actions Bot added the type:bug Something isn't working label Oct 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type:bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant