mediaframe/source/vuyx/
mod.rs1use crate::frame::VuyxFrame;
20
21walker! {
22 packed {
23 #[derive(Debug, Clone, Copy, Default, PartialEq, Eq, Hash)]
25 marker: Vuyx,
26 frame: VuyxFrame<'_>,
27 row: VuyxRow,
28 sink: VuyxSink,
29 walker: vuyx_to,
30 buf_field: packed,
31 elem_type: u8,
32 row_elems: |w| w * 4,
33 row_doc: concat!(
34 "One row of a [`Vuyx`] source — `width × 4` bytes (4 channels per\n",
35 "pixel: V, U, Y, A; the A byte is padding and is ignored on read).\n",
36 "\n",
37 "Byte layout per pixel:\n",
38 "\n",
39 "| Byte offset | Field |\n",
40 "|-------------|-------|\n",
41 "| 0 | V |\n",
42 "| 1 | U |\n",
43 "| 2 | Y |\n",
44 "| 3 | A (padding — ignored on read; RGBA outputs force α=`0xFF`) |\n",
45 "\n",
46 "The walker does not interpret the bytes — it passes the raw packed\n",
47 "slice to the sink. Byte-level channel extraction happens in the\n",
48 "row-kernel layer.\n",
49 "\n",
50 "Full range: `[0, 255]` (8-bit). Limited range Y: `[16, 235]`,\n",
51 "limited range chroma: `[16, 240]`.",
52 ),
53 walker_doc: "Walks a [`VuyxFrame`](crate::frame::VuyxFrame) row by row into the sink.",
54 }
55}
56
57#[cfg(all(test, feature = "std"))]
58mod tests;