Research 0119: ROI-Score High-Bit-Depth Mask Materialisation¶
Summary¶
The user-facing vmaf-roi-score docs still described the saliency-mask materialiser as 8-bit planar YUV only. That left CHUG/HDR-style 10-bit inputs on the unweighted full-frame path even though the Python Option C tool already owns mask materialisation outside libvmaf.
Findings¶
tools/vmaf-roi-score/src/vmafroiscore/mask.pyrejected pix_fmts that contained10,12, or16.- The mask inference API already consumes 8-bit RGB bytes, so high-bit support does not require a model-input schema change.
- The output YUV must remain native-depth: down-converting the masked file to 8-bit would make the subsequent
vmaf --bitdepthinvocation score malformed input.
Decision Input¶
The smallest useful fix is to keep the existing Option C algorithm and make the plane reader/writer bit-depth-aware:
- Parse little-endian planar 8/10/12/16-bit pix_fmts.
- Blend Y/U/V samples at native integer depth.
- Down-convert only the reference frame used for saliency-model RGB inference.
- Keep big-endian high-bit-depth YUV out of scope until a real caller needs it.