Repository navigation
fix(tools): accept odd dimensions for raw YUV chroma-subsampled inputs (ADR-1398) - #1672
Merged
Merged
Conversation
…s (ADR-1398) The vmaf CLI formerly refused odd-sized raw YUV 4:2:0 and 4:2:2 inputs with "odd width/height %d not allowed..." via validate_chroma_alignment() (ADR-0461), whereas .y4m inputs were accepted because frame_w was padded to a multiple of 16. The C engine and raw readers handle odd dimensions with ceiling chroma (vmaf_chroma_extent(), picture_geometry.h, PR #1643, PR #1664). Per user decision on 2026-10-01 ("Accept both (Recommended)"), the CLI now accepts raw YUV inputs with odd dimensions using ceiling chroma, matching .y4m. - core/tools/vmaf.cpp: validate_chroma_alignment() returns 0. - core/tools/test/test_vmaf_raw_odd_dims.sh: add positive (19x19, 1921x1081, 19x20, 20x19, 19x19 422), boundary (1x1 420/422), and negative (file size mismatch exits 2 cleanly) regression tests. - core/tools/test/test_vmaf_option_dict_ownership.sh: test Case 2 with mismatched dimensions instead of odd height to preserve early-exit dictionary leak coverage. - python/test/vmafx_cli_test.py: add unit tests asserting raw YUV scores match Y4M bit-identically for odd dimensions, 1x1 boundary, and file size error handling. - docs: document odd dimensions support in docs/usage/cli.md and core/tools/AGENTS.md, record ADR-1398, update docs/state.md, docs/rebase-notes.md, changelog fragment, and citations registry. Closes T-CLI-RAW-ODD-DIMENSIONS-REFUSED-2026-10-01.
lusoris
force-pushed
the
fix/cli-raw-odd-420
branch
from
October 1, 2026 09:26
4e6fe9d to
ccbd040
Compare
This was referenced Oct 1, 2026
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
Accept odd dimensions for raw YUV 4:2:0 and 4:2:2 inputs in the
vmafCLI using ceiling chroma, matching.y4mbehaviour (ADR-1398). Previouslyvalidate_chroma_alignment()refused odd widths for 4:2:0/4:2:2 and odd heights for 4:2:0 while.y4minputs were accepted. Per user decision 2026-10-01 ("Accept both (Recommended)"), the CLI validates positive dimensions and allows odd dimensions for raw YUV inputs with ceil chroma ((dim + 1) / 2).Type
fix— bug fixChecklist
make format && make lintis green locally.python3 scripts/ci/run_meson_test.py -- -C build./cross-backend-diffand the worst ULP is ≤ 2..c/.cpp/.cu/.h/.hpp, it has the appropriate license header (seeCONTRIBUTING.md).!orBREAKING CHANGE:and the migration path is documented below.docs/adr/_index_fragments/<NNNN-slug>.mdand the slug is appended todocs/adr/_index_fragments/_order.txt— do not editdocs/adr/README.mddirectly (regenerated byscripts/docs/concat-adr-index.sh; see ADR-0221).Bug-status hygiene (ADR-0165)
docs/state.mdupdated in this PR with a row in the appropriate section (Open / Recently closed / Confirmed not-affected / Deferred), ORno state delta: REASON.Netflix golden-data gate (ADR-0024)
assertAlmostEqual(...)score in the Netflix golden Python tests.Deep-dive deliverables (ADR-0108)
## Alternatives considered(ADR-1398).AGENTS.mdinvariant note — added to the relevant package'sAGENTS.md.changelog.d/<section>/<topic>.md(added/changed/deprecated/removed/fixed/security). Do not editCHANGELOG.mddirectly —scripts/release/concat-changelog-fragments.shrenders the Unreleased block from the fragment tree (see ADR-0221).docs/rebase-notes.mdunder a new ID, ORno rebase impact: REASON.Reproducer
meson test -C build test_vmaf_raw_odd_dims test_vmaf_option_dict_ownership python3 -m unittest python/test/vmafx_cli_test.pyKnown follow-ups
None.