Skip to main content

mediaframe/source/
yuva420p9.rs

1//! YUVA 4:2:0 planar 9‑bit (`AV_PIX_FMT_YUVA420P9LE`).
2//!
3//! Storage mirrors [`super::Yuv420p9`] — three planes for Y / U / V at
4//! the standard 4:2:0 layout (Y full-size, U / V half-width × half-
5//! height) — plus a fourth full-resolution alpha plane (1:1 with Y;
6//! only chroma is subsampled in 4:2:0). Sample width is **`u16`**
7//! (9 active bits in the low bits of each element).
8//!
9//! Tranche 8b‑2a ships the scalar prep — the per‑row dispatcher hands
10//! the alpha source straight through to the
11//! `yuv_420p_n_to_rgba*_with_alpha_src_row::<9>` scalar path. Per‑arch
12//! SIMD wiring lands in 8b‑2b (`u8` RGBA) and 8b‑2c (`u16` RGBA).
13
14use crate::frame::Yuva420pFrame16;
15
16walker! {
17  planar4_bits_be {
18    /// Zero‑sized marker for the YUVA 4:2:0 **9‑bit** source format.
19    #[derive(Debug, Clone, Copy, Default, PartialEq, Eq, Hash)]
20    marker: Yuva420p9,
21    frame: Yuva420pFrame16<'_, 9, BE>,
22    frame_le: Yuva420pFrame16<'_, 9, false>,
23    generic_frame: Yuva420pFrame16<'_, BITS, BE>,
24    bits: 9,
25    row: Yuva420p9Row,
26    sink: Yuva420p9Sink,
27    walker: yuva420p9_to,
28    walker_endian: yuva420p9_to_endian,
29    walker_inner: yuva420p9_walker,
30    elem_type: u16,
31    chroma_h: half,
32    chroma_v: half,
33    row_doc: "One output row of a [`Yuva420p9`] source.",
34    walker_doc: "Walks a [`Yuva420p9Frame`](crate::frame::Yuva420p9Frame) row by row into the sink.",
35  }
36}