#[derive(Copy, Clone, Debug, Eq, PartialEq)]
pub enum NativePlaneLayout {
I420,
Nv12,
P010,
}
impl NativePlaneLayout {
#[must_use]
pub const fn bit_depth(self) -> u8 {
match self {
Self::I420 | Self::Nv12 => 8,
Self::P010 => 10,
}
}
#[must_use]
pub const fn bytes_per_pixel_numerator(self) -> u64 {
match self {
Self::I420 | Self::Nv12 => 3,
Self::P010 => 6,
}
}
}
#[derive(Copy, Clone, Debug, Eq, PartialEq)]
pub struct ImportedPlaneDescriptor {
pub image: u64,
pub format: u32,
pub width: u32,
pub height: u32,
}