#[non_exhaustive]pub struct Pipe1Config {
pub source: InputSource,
pub virtual_channel: u8,
pub csi_data_type: u8,
pub output: PixelFormat,
pub pitch_bytes: u16,
pub swap_rb: bool,
pub demosaic: Option<BayerPattern>,
pub crop: Option<CropConfig>,
pub downsize: Option<DownsizeConfig>,
}Expand description
Pipe1 (main) configuration.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.source: InputSourceUpstream source.
virtual_channel: u8CSI-2 virtual channel (0..=3) to latch pixels from.
csi_data_type: u8CSI-2 data type ID to filter the incoming stream (e.g. 0x2B for
RAW10, 0x24 for RGB888). Ignored when source is
InputSource::Parallel. Defaults to 0x2B (RAW10) — the most
common Bayer-sensor format.
output: PixelFormatOutput pixel format as written to memory.
pitch_bytes: u16Line pitch in bytes. Must be a multiple of 16 per RM0486 §39.14.88.
swap_rb: boolSwap R/B components (or U/V for YUV). Useful e.g. to flip NV21 ↔ NV12.
demosaic: Option<BayerPattern>Demosaic configuration. None bypasses the demosaic block (input must
already be RGB/YUV). Some(pattern) enables it for the given Bayer
layout — required when the sensor feeds 8/10/12/14-bit raw Bayer.
crop: Option<CropConfig>Crop window (in pixels). Applied before downsize.
downsize: Option<DownsizeConfig>Downsize configuration. Ratios outside 1×..8× are clamped.
Implementations§
Source§impl Pipe1Config
impl Pipe1Config
Sourcepub const fn new(
source: InputSource,
output: PixelFormat,
pitch_bytes: u16,
) -> Self
pub const fn new( source: InputSource, output: PixelFormat, pitch_bytes: u16, ) -> Self
Create a Pipe1 configuration with default R/B order, virtual channel 0,
RAW10 CSI data type, no demosaic, no crop, and no downsize.
pitch_bytes must be a multiple of 16 (DCMIPP output alignment).