Skip to content

Research 0124: vmaf-perShot 4:2:2 / 4:4:4 Input

Date: 2026-05-15

Question

docs/usage/vmaf-perShot.md still documented YUV420P as the only accepted input, even though the tool's shot detector and CRF prior use only luma. The question was whether 4:2:2 and 4:4:4 planar inputs could be accepted without changing the CSV / JSON plan schema.

Findings

  • The scanner reads the luma plane and skips chroma before the next frame. Therefore 4:2:2 / 4:4:4 support only needs correct chroma-byte accounting.
  • The output schema is independent of chroma subsampling: mean_complexity, mean_motion, and predicted_crf are luma-derived scalars.
  • The existing bit-depth path already uses 16-bit sample containers for high-bit-depth luma; restricting accepted depths to 8|10|12|16 keeps the CLI aligned with user docs and other raw-YUV fork surfaces.

Alternatives Considered

Option Result Rationale
Keep rejecting 4:2:2 / 4:4:4 Rejected It leaves a documented v1 limitation in place even though the luma-only algorithm has no chroma dependency.
Decode through FFmpeg Rejected This sidecar intentionally reads raw planar YUV with no demuxer dependency.
Accept 4:2:2 / 4:4:4 by changing only chroma skip math Accepted It removes the input-format limitation while preserving the existing detector, predictor, and output schema.

Decision

Accept --pixel_format 420|422|444 in vmaf-perShot. Keep the signal path luma-only, but compute chroma bytes from the selected planar subsampling so frame iteration remains aligned.

Validation

The Meson smoke test now generates small two-frame 4:2:2 and 4:4:4 fixtures, runs vmaf-perShot on both, and verifies unsupported 411 and 9-bit inputs are rejected.