Skip to main content

mediaframe/source/
yuva444p12.rs

1//! YUVA 4:4:4 planar 12‑bit (`AV_PIX_FMT_YUVA444P12LE`).
2//!
3//! Full‑resolution chroma + an alpha plane, 1:1 with Y. Mirrors
4//! [`super::Yuv444p12`] but additionally carries a per‑row alpha slice
5//! (also `width` `u16` samples, low‑bit‑packed at 12 bits).
6//!
7//! Ship 8b‑4 wires this format end to end. The per‑row dispatcher
8//! hands the alpha source straight through to the
9//! `yuv_444p_n_to_rgba*_with_alpha_src_row::<12>` SIMD/scalar path —
10//! per‑arch SIMD comes free because the BITS-generic 4:4:4 template
11//! already covers `BITS ∈ {9, 10, 12, 14}`, so the dispatcher selects
12//! SIMD when `use_simd` is true and falls back to scalar otherwise.
13
14use crate::frame::Yuva444pFrame16;
15
16walker! {
17  planar4_be {
18    /// Zero‑sized marker for the YUVA 4:4:4 **12‑bit** source format.
19    #[derive(Debug, Clone, Copy, Default, PartialEq, Eq, Hash)]
20    marker: Yuva444p12,
21    frame: Yuva444pFrame16<'_, 12, BE>,
22    frame_le: Yuva444pFrame16<'_, 12, false>,
23    row: Yuva444p12Row,
24    sink: Yuva444p12Sink,
25    walker: yuva444p12_to,
26    walker_endian: yuva444p12_to_endian,
27    elem_type: u16,
28    chroma_h: full,
29    chroma_v: full,
30    row_doc: "One output row of a [`Yuva444p12`] source.",
31    walker_doc: "Walks a [`Yuva444p12Frame`](crate::frame::Yuva444p12Frame) row by row into the sink.",
32  }
33}