mediaframe/source/yuva444p14.rs
1//! YUVA 4:4:4 planar 14‑bit. FFmpeg does not ship a `yuva444p14`
2//! pixel format; this module exists for symmetry with
3//! [`super::Yuv444p14`] (which the colconv 4:4:4 BITS-generic kernel
4//! templates already cover) so callers can opt into 14‑bit YUVA
5//! through the same per‑arch SIMD path used for the FFmpeg-shipped
6//! 9 / 10 / 12 / 16 depths.
7//!
8//! Full‑resolution chroma + an alpha plane, 1:1 with Y. Mirrors
9//! [`super::Yuv444p14`] but additionally carries a per‑row alpha slice
10//! (also `width` `u16` samples, low‑bit‑packed at 14 bits).
11//!
12//! Ship 8b‑4 wires this format end to end. The per‑row dispatcher
13//! hands the alpha source straight through to the
14//! `yuv_444p_n_to_rgba*_with_alpha_src_row::<14>` SIMD/scalar path —
15//! per‑arch SIMD comes free because the BITS-generic 4:4:4 template
16//! already covers `BITS ∈ {9, 10, 12, 14}`, so the dispatcher selects
17//! SIMD when `use_simd` is true and falls back to scalar otherwise.
18
19use crate::frame::Yuva444pFrame16;
20
21walker! {
22 planar4_be {
23 /// Zero‑sized marker for the YUVA 4:4:4 **14‑bit** source format.
24 #[derive(Debug, Clone, Copy, Default, PartialEq, Eq, Hash)]
25 marker: Yuva444p14,
26 frame: Yuva444pFrame16<'_, 14, BE>,
27 frame_le: Yuva444pFrame16<'_, 14, false>,
28 row: Yuva444p14Row,
29 sink: Yuva444p14Sink,
30 walker: yuva444p14_to,
31 walker_endian: yuva444p14_to_endian,
32 elem_type: u16,
33 chroma_h: full,
34 chroma_v: full,
35 row_doc: "One output row of a [`Yuva444p14`] source.",
36 walker_doc: "Walks a [`Yuva444p14Frame`](crate::frame::Yuva444p14Frame) row by row into the sink.",
37 }
38}