Scalar bilinear scale on u16 (10-bit) samples. Mirrors the 8-bit
bilinear_scale_plane_scalar algorithm; the only differences are
the wider sample type and the absence of u8 saturation at the
output (10-bit values up to 1023 fit comfortably in u16, no
overflow risk in the f64 intermediate).
Runtime-dispatched entry point. Uses AVX2 if the CPU advertises
it, scalar fallback otherwise. Safe wrapper around the unsafe
target-feature specialization.
Scalar 10-bit BT.601 → BT.709 reference. Same algorithm as the
8-bit bt601_to_bt709_scalar, but operates on u16 planes
(10-bit values in 0..=1023). width / height are luma
dimensions; chroma planes are half-resolution per axis (4:2:0).
High-level frame-shaped wrapper. Takes a Yuv444p10le /
Yuva444p10leVideoFrame and returns a Yuv420p10leVideoFrame ready for the 10-bit AV1 encoder. Alpha plane (if
present) is dropped with a warn-log — see module docstring for
rationale. 8-bit equivalent (Yuv444p → Yuv420p) follows the
same pattern, plumbed through downsample_chroma_444_to_420.
2×2 box-average chroma downsample for 8-bit Yuv444p → Yuv420p.
Y plane is copied verbatim; Cb and Cr planes shrink 2× in each axis
with rounded averages.
10-bit variant for Yuv444p10le → Yuv420p10le. Operates on u16
samples in the 0..=1023 range; output samples are written as LE
u16 bytes packed alongside the copied Y plane.