Skip to main content

mediaframe/source/
yuva444p16.rs

1//! YUVA 4:4:4 planar 16‑bit (`AV_PIX_FMT_YUVA444P16LE`).
2//!
3//! Storage mirrors [`super::Yuv444p16`] (Y / U / V each full-resolution,
4//! `u16` samples — at 16 bits there is no upper-bit-zero slack; the
5//! full `u16` range is active) plus a fourth full-resolution alpha
6//! plane (1:1 with Y).
7//!
8//! For the native-depth `u16` output path, this uses the **dedicated
9//! i64 4:4:4 kernel family** because the Q15 chroma sum overflows
10//! i32 at 16 bits. The `u8` output path stays on the scaled Q15 i32
11//! route (output-target scaling keeps `coeff × u_d` inside i32).
12//! Either way it sits separate from the BITS-generic Q15 i32 template
13//! that covers `BITS ∈ {9, 10, 12, 14}`. Mirrors the 4:2:0 sibling
14//! [`super::Yuva420p16`].
15//!
16//! Tranche 8b‑5a ships the scalar prep — the per‑row dispatcher hands
17//! the alpha source straight through to the
18//! `yuv_444p16_to_rgba*_with_alpha_src_row` scalar paths. Per‑arch
19//! SIMD wiring lands in 8b‑5b (`u8` RGBA) and 8b‑5c (`u16` RGBA).
20
21use crate::frame::Yuva444pFrame16;
22
23walker! {
24  planar4_be {
25    /// Zero‑sized marker for the YUVA 4:4:4 **16‑bit** source format.
26    #[derive(Debug, Clone, Copy, Default, PartialEq, Eq, Hash)]
27    marker: Yuva444p16,
28    frame: Yuva444pFrame16<'_, 16, BE>,
29    frame_le: Yuva444pFrame16<'_, 16, false>,
30    row: Yuva444p16Row,
31    sink: Yuva444p16Sink,
32    walker: yuva444p16_to,
33    walker_endian: yuva444p16_to_endian,
34    elem_type: u16,
35    chroma_h: full,
36    chroma_v: full,
37    row_doc: "One output row of a [`Yuva444p16`] source.",
38    walker_doc: "Walks a [`Yuva444p16Frame`](crate::frame::Yuva444p16Frame) row by row into the sink.",
39  }
40}