//! Packed **RGB8** source (`AV_PIX_FMT_RGB8`) — packed RGB 3:3:2, one byte per
//! pixel: bits [7:5]=R3, [4:2]=G3, [1:0]=B2. No alpha. No unused bits.
//!
//! Outputs (Tier 7):
//! - `with_rgb`      — expand each channel to u8 via bit-replication, pack as `R, G, B`.
//! - `with_rgba`     — same + constant α=`0xFF`.
//! - `with_rgb_u16`  — native 3/3/2-bit precision, low-bit aligned in `u16`.
//! - `with_rgba_u16` — same + constant α=`0xFFFF`.
//! - `with_luma`     — Y′ luma staged through u8 RGB scratch.
//! - `with_luma_u16` — zero-extended u8 luma widened to u16.
//! - `with_hsv`      — HSV staged through u8 RGB scratch.

use crate::frame::Rgb8Frame;

walker! {
  packed {
    /// Zero-sized marker for the packed **RGB8** (`AV_PIX_FMT_RGB8`) source format.
    #[derive(Debug, Clone, Copy, Default, PartialEq, Eq, Hash)]
    marker: Rgb8,
    frame: Rgb8Frame<'_>,
    row: Rgb8Row,
    sink: Rgb8Sink,
    walker: rgb8_to,
    buf_field: rgb8,
    elem_type: u8,
    row_elems: |w| w,
    row_doc: "One output row of an [`Rgb8`] source — `width` bytes,\n\
              one byte per pixel.\n\
              \n\
              Bit layout per byte (packed RGB 3:3:2, `(msb)3R 3G 2B(lsb)`):\n\
              \n\
              | Bits  | Field |\n\
              |-------|-------|\n\
              | 7:5   | R (3 bits, range [0, 7]) |\n\
              | 4:2   | G (3 bits, range [0, 7]) |\n\
              | 1:0   | B (2 bits, range [0, 3]) |\n\
              \n\
              No source alpha; RGBA outputs force α=`0xFF` / `0xFFFF`.",
    walker_doc: "Walks an [`Rgb8Frame`](crate::frame::Rgb8Frame) row by row into the sink.",
  }
}
